Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new rule to oav error document. #13722

Merged
merged 2 commits into from
Mar 30, 2021
Merged
Changes from 1 commit
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
11 changes: 10 additions & 1 deletion documentation/Semantic-and-Model-Violations-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ This document lists the set of automated rules that can be validated against swa
| [ROUNDTRIP_ADDITIONAL_PROPERTY](#ROUNDTRIP_ADDITIONAL_PROPERTY) | |
| [LRO_RESPONSE_CODE](#LRO_RESPONSE_CODE) | |
| [LRO_RESPONSE_HEADER](#LRO_RESPONSE_HEADER) | |
| [MISSING_RESOURCE_ID](#MISSING_RESOURCE_ID) | |


### Validation Warnings
Expand Down Expand Up @@ -832,7 +833,7 @@ This document lists the set of automated rules that can be validated against swa

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

**Output Message**: Patch/Post long running operation must return 201 or 202, Delete long running operation must return 202 or 204, Put long running operation must return 202 or 201 or 200, but {statusCode} returned.
**Output Message**: For initial request, Patch/Post long running operation must return 201 or 202, Delete long running operation must return 202 or 204, Put long running operation must return 202 or 201 or 200, but {statusCode} returned.
raych1 marked this conversation as resolved.
Show resolved Hide resolved

**Description**: Long running operation must return specific response code as per http method type when this operation is annotated with x-ms-long-running-operation:true.

Expand All @@ -845,3 +846,11 @@ This document lists the set of automated rules that can be validated against swa
**Description**: Long running operation must return location header or azure-AsyncOperation header in response when this operation is annotated with x-ms-long-running-operation:true.

**How to fix the violation**: Adding one of these headers to the response.

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

**Output Message**: id is required to return in response of GET/PUT resource calls but not provided.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what ID? should it be more specific?

... is required to return in response of ....but not being provided


**Description**: id is a required field of azure resource to return in response body of each GET or PUT call when this resource is annotated as x-ms-azure-resource: true.

**How to fix the violation**: Adding id to the response body.
raych1 marked this conversation as resolved.
Show resolved Hide resolved