Skip to content

Commit

Permalink
Adding id for license header rule (Azure#1327)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsgouda authored and sarangan12 committed Jun 19, 2017
1 parent 668297d commit 2eec002
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions documentation/openapi-authoring-automated-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ We request OpenAPI(Swagger) spec authoring be assigned to engineers who have an
| [R2006](#R2006) | ControlCharactersNotAllowed | Specification must not contain any control characters. | Error |
| [R2009](#R2009) | ArraySchemaMustHaveItems | A property of type `Array` must have `items` defined in its `Schema`. | Error |
| [R2022](#R2022) | [XmsExamplesRequired](#R2022) | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations.{0} | Error |
| [R2064](#R2064) | [LicenseMissing](#R2064) | Please provide correct licensing information here. Acceptable value: "name": "MICROSOFT\_MIT\_NO\_VERSION" | Error |

#### SDK Warnings

Expand Down Expand Up @@ -1013,3 +1014,14 @@ Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rul
**Examples**: Please refer the documentation of [x-ms-examples](https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/x-ms-examples.md#why-x-ms-examples).

Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rules](#automated-rules) | [RPC](#rpc-violations): [Errors](#rpc-errors) or [Warnings](#rpc-warnings) | [SDK](#sdk-violations): [Errors](#sdk-errors) or [Warnings](#sdk-warnings)

### <a name="R2064" />R2064 LicenseMissing
**Output Message**: Please provide correct licensing information here. Acceptable value: "name": "MICROSOFT\_MIT\_NO\_VERSION"

**Description**: Each OpenAPI json document must contain the license object in its `info` section which must set the name to `MICROSOFT\_MIT\_NO\_VERSION`. This is necessary for AutoRest to insert the appropriate headers in the generated code.

**Why the rule is important**: Missing or invalid license information can cause incorrect or empty headers in the generated code.

**How to fix the violation**: Ensure the `info` section of OpenAPI document has the name property set to `MICROSOFT\_MIT\_NO\_VERSION`.

Links: [Index](#index) | [Error vs. Warning](#error-vs-warning) | [Automated Rules](#automated-rules) | [RPC](#rpc-violations): [Errors](#rpc-errors) or [Warnings](#rpc-warnings) | [SDK](#sdk-violations): [Errors](#sdk-errors) or [Warnings](#sdk-warnings)

0 comments on commit 2eec002

Please sign in to comment.