Type References

The following object types are used in config for running a test in hypertest cli.

Response Difference
### respDiff

Describes a single difference between expected response to the actual response.

#### Properties

| Property Name          | Type                | Non-Optional | Description                               
|------------------------|---------------------|--------------|-------------------------------------------|      
| `differenceSection`    | `DifferenceSection` | Yes          | The category of difference.               
| `differenceType`       | `DifferenceType`    | Yes          | This exemplifies the kind of difference.  
| `evaluatedPath`        | `string[]`          | Yes          | Path of the key abstracting array indices.
| `newPath`              | `string[]`          | Yes          | Path of the key in the actual response.   
| `newValue`             | `ValueType`         | Yes          | Value in the actual response.
| `originalPath`         | `string[]`          | Yes          | Path of the key in original response difference.
| `originalValue`        | `ValueType`         | Yes          | Value in the original response.
| `requestIdentifier`    | `string`            | Yes          | A unique key to identify a request.
| `requestType`          | `RequestType`       | Yes          | Type that distinguishes the server used.
| `severityScore`        | `number`            | Yes          | Severity of the error.


#### Enum: DifferenceSection

Possible values for DifferenceSection.

- `NOISY_ERROR`: error due to a ever changing value in a field.
- `ERROR`: Indicates that there was an error processing the request.

#### Enum: DifferenceType

Possible values for DifferenceType

- `VALUE_MODIFIED`
- `DATA_TYPE_CHANGED` and more.

#### ValueType

Keys present in ValueType

- `htType`: string
- `langType`: string
- `value`: any 

#### RequestType

Possible values for RequestType

- `HTTP`
- `GRAPHQL`
- `GRPC`
- `KAFKA`
- `AMQP`
Mock Difference
### mockDiff

Describes a single difference between recorded mock to the actual mock.

#### Properties

| Property Name          | Type                | Non-Optional | Description                               
|------------------------|---------------------|--------------|-------------------------------------------|      
| `differenceSection`    | `DifferenceSection` | Yes          | The category of difference.               
| `differenceType`       | `DifferenceType`    | Yes          | This exemplifies the kind of difference.  
| `evaluatedPath`        | `string[]`          | Yes          | Path of the key abstracting array indices.
| `newPath`              | `string[]`          | Yes          | Path of the key in the actual response.   
| `newValue`             | `ValueType`         | Yes          | Value in the actual response.
| `originalPath`         | `string[]`          | Yes          | Path of the key in original response difference.
| `originalValue`        | `ValueType`         | Yes          | Value in the original response.
| `mockIdentifier`       | `string`            | Yes          | A unique key to identify a mock.
| `originalMockId`       | `bigint`            | Yes          | Mock Id corresponding to the recorded mock.
| `severityScore`        | `number`            | Yes          | Severity of the error.


#### Enum: DifferenceSection

Possible values for DifferenceSection.

- `NOISY_ERROR`: error due to a ever changing value in a field.
- `ERROR`: Indicates that there was an error processing the request.

#### Enum: DifferenceType

Possible values for DifferenceType

- `VALUE_MODIFIED`
- `DATA_TYPE_CHANGED` and more.

#### ValueType

Keys present in ValueType

- `htType`: string
- `langType`: string
- `value`: any 
Current Mock
### currentMock

Original mock recorded which now has a difference with the replayed mock.

#### Properties

| Property Name          | Type                | Non-Optional | Description                               
|------------------------|---------------------|--------------|-------------------------------------------|
| `submoduleName`        | `string`            | Yes          | Submodule name of the mock.        
| `moduleName`           | `string`            | Yes          | Module name of the mock.               
| `id`                   | `bigint`            | Yes          | Recorded mock id.
| `OutputStatus`         | `OutputStatus`      | Yes          | Status of mock. 
| `readableInput`        | `object`            | Yes          | Mock input.
| `readableOutput`       | `object`            | Yes          | Mock output.   
| `err`                  | `object`            | Yes          | Mock error.

#### Enum: OutputStatus

Possible values for OutputStatus.

- `ERROR`
- `OKAY`

Request Object

### requestObj

Describes the components of a recorded http request.

#### Properties

| Property Name          | Type                | Non-Opitonal | Description                               
|------------------------|---------------------|--------------|-------------------------------------------|
| `i_bodyType`           | `BodyType`          | Yes          | Body type of the http request.        
| `i_clusterPath`        | `string`            | Yes          | Cluster path for the http request.               
| `i_headers`            | `object`            | Yes          | Headers for the request.  
| `i_method     `        | `string`            | Yes          | Verb of the request.
| `i_path`               | `string`            | Yes          | Actual path of the request.   
| `i_query`              | `object`            | Yes          | Query of the request.
| `id`                   | `bigint`            | Yes          | Id of the recorded request.
| `i_host`               | `string`            | Yes          | Host of the request.
| `i_jsonBody`           | `object`            | Yes          | Request body.
| `requestType`          | `RequestType`       | Yes          | Server type.
| `o_jsonBody`           | `string`            | Yes          | Response body.
| `o_headers`            | `object`            | Yes          | Response headers.
| `o_statusCode`         | `number`            | Yes          | Response status code.
| `OutputStatus`         | `OutputStatus`      | Yes          | Status of the request.

#### Enum: BodyType

Possible values for BodyType.

- `JSON`
- `MULTIPART`
- `RAW` and more.

#### RequestType

Possible values for RequestType

- `HTTP`
- `GRAPHQL`
- `GRPC`
- `KAFKA`
- `AMQP`

#### Enum: OutputStatus

Possible values for OutputStatus.

- `ERROR`
- `OKAY`

Last updated