diff --git a/documentation/Semantic-and-Model-Violations-Reference.md b/documentation/Semantic-and-Model-Violations-Reference.md index ff53c3ad1174..b2b147cbf463 100644 --- a/documentation/Semantic-and-Model-Violations-Reference.md +++ b/documentation/Semantic-and-Model-Violations-Reference.md @@ -61,9 +61,9 @@ This document lists the set of automated rules that can be validated against swa | [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) | | +| [SECRET_PROPERTY](#SECRET_PROPERTY) | | | [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) | @@ -359,14 +359,6 @@ This document lists the set of automated rules that can be validated against swa **How to fix the violation**: The error info has the position of swagger, look for the position in swagger and fix the value type of keyword. -### KEYWORD_TYPE_EXPECTED - -**Output Message**: Keyword '{0}' is expected to be of type '{1}'. - -**Description**: The value of the keyword in swagger should be the specific type. - -**How to fix the violation**: Fix the value type of keyword. - ### PATTERN **Output Message**: String does not match pattern {0}: {1}. @@ -547,9 +539,9 @@ This document lists the set of automated rules that can be validated against swa **Output Message**: This operation does not have a defined {0} response code. -**Description**: There's extra response code defined in example file. +**Description**: The specified response code is not defined in example file. -**How to fix the violation**: Remove extra response code definition in example or correct it. +**How to fix the violation**: Add response code to default, or add response code definition in the swagger. ### INVALID_RESPONSE_BODY @@ -559,15 +551,6 @@ This document lists the set of automated rules that can be validated against swa **How to fix the violation**: Add response body. - -### KEYWORD_TYPE_EXPECTED - -**Output Message**: Keyword 'type' is expected to be of type 'array,boolean,integer,number,null,object,string'. - -**Description**: According to Json schema spec, the allowed value for [type](http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.1.1) is 'array,boolean,integer,number,null,object,string'. - -**How to fix the violation**: Set the value of type to one of the values above. - ### OBJECT_ADDITIONAL_PROPERTIES **Output Message**: Additional properties not allowed:{0}. @@ -801,6 +784,14 @@ This document lists the set of automated rules that can be validated against swa **How to fix the violation**: Remove this definition if it's not used. +### SECRET_PROPERTY + +**Output Message**: Secret property {0} cannot be sent in the response. + +**Description**: The secret is not allowed to return in response when it's annotated with x-ms-secret:true. + +**How to fix the violation**: Remove this secret value from the response. + ### ROUNDTRIP_INCONSISTENT_PROPERTY @@ -826,4 +817,4 @@ This document lists the set of automated rules that can be validated against swa **Description**: The property was not in the PUT request, but it is returned in the subsequent GET response. This implies that the property is read-only or has a default value. -**How to fix the violation**: If the property is a read-only, update the swagger definition for this property to mark it as "readOnly": true. Alternatively, keep the property in the GET schema but remove it from the PUT schema. If the property has a default value, update the Swagger definition for this property to mark it with "default": annotation. \ No newline at end of file +**How to fix the violation**: If the property is a read-only, update the swagger definition for this property to mark it as "readOnly": true. Alternatively, keep the property in the GET schema but remove it from the PUT schema. If the property has a default value, update the Swagger definition for this property to mark it with "default": annotation.