Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions documentation/Semantic-and-Model-Violations-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ This document lists the set of automated rules that can be validated against swa
| [REMOTE_NOT_VALID](#REMOTE_NOT_VALID) | |
| [INVALID_REQUEST_PARAMETER](#INVALID_REQUEST_PARAMETER) | |
| [INVALID_RESPONSE_CODE](#INVALID_RESPONSE_CODE) | |
| [INVALID_RESPONSE_BODY](#INVALID_RESPONSE_BODY) | |
| [MISSING_REQUIRED_PARAMETER](#MISSING_REQUIRED_PARAMETER) | |
| [KEYWORD_TYPE_EXPECTED](#KEYWORD_TYPE_EXPECTED) | |
| [READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST](#READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST) | |
| [SCHEMA_VALIDATION_FAILED](#SCHEMA_VALIDATION_FAILED) | |
| [DISCRIMINATOR_VALUE_NOT_FOUND](#DISCRIMINATOR_VALUE_NOT_FOUND) | |
| [DISCRIMINATOR_NOT_REQUIRED](#DISCRIMINATOR_NOT_REQUIRED) | [OAV131](#DISCRIMINATOR_NOT_REQUIRED) |
| [RESPONSE_BODY_NOT_IN_EXAMPLE](#RESPONSE_BODY_NOT_IN_EXAMPLE) | [OAV130](#RESPONSE_BODY_NOT_IN_EXAMPLE) |
| [DOUBLE_FORWARD_SLASHES_IN_URL](#DOUBLE_FORWARD_SLASHES_IN_URL) | [OAV129](#DOUBLE_FORWARD_SLASHES_IN_URL) |
Expand Down Expand Up @@ -546,6 +548,15 @@ This document lists the set of automated rules that can be validated against swa

**How to fix the violation**: Remove extra response code definition in example or correct it.

### <a name="INVALID_RESPONSE_BODY" />INVALID_RESPONSE_BODY

**Output Message**:Body is required in response but not provided

**Description**: Body schema is defined in swagger but body is not found in example or traffic.

**How to fix the violation**: Add response body.


### <a name="KEYWORD_TYPE_EXPECTED" />KEYWORD_TYPE_EXPECTED

**Output Message**: Keyword 'type' is expected to be of type 'array,boolean,integer,number,null,object,string'.
Expand Down Expand Up @@ -611,6 +622,14 @@ This document lists the set of automated rules that can be validated against swa

**How to fix the violation**: Provide the requried property in example or remove this property from the required list of the definition in swagger spec. Or add items property if the type is array.

### <a name="DISCRIMINATOR_VALUE_NOT_FOUND" />DISCRIMINATOR_VALUE_NOT_FOUND

**Output Message**: Discriminator value "{0}" not found

**Description**: The property used as discriminator has a value {0} but it's not found in swagger spec.

**How to fix the violation**: Add the model that has the discriminator value or fix the discriminator value. The discriminator value could be specified by model name in definitions or by "x-ms-discriminator-value".


### <a name="DISCRIMINATOR_NOT_REQUIRED" />DISCRIMINATOR_NOT_REQUIRED

Expand Down