Azure / Azure/azure-openapi-validator

Linter should check the operation id

Open
#253 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
53
Forks
57
Avg merge
1d 23h
Merged PRs (30d)
2

Description

Some of the operation use '-' instead of '_' to connect operation group and operation. Linter should check it to consolidate operation id format.
``` json
"patch": {
"tags": [
"SubscriptionLevelSaaSResources"
],
"operationId": "SaasSubscriptionLevel_Update",
"description": "Updates a SaaS Subscription Level resource.",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SaasResourceCreation"
},
"description": "Parameters supplied to the update saas operation."
}
],
"responses": {
"200": {
"description": "Resource change has completed.",
"schema": {
"$ref": "#/definitions/SaasResource"
}
},
"202": {
"description": "Accepted and the operation will complete asynchronously.",
"headers": {
"Location": {
"description": "The URL to check the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"format": "int32",
"type": "integer"
}
}
},
"204": {
"description": "Operation completed successfully."
},
"default": {
"description": "A response indicating an error.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Update subscription level SaaS resource": {
"$ref": "./examples/saasSubscriptionLevel/SaasPatch.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
},
"delete": {
"tags": [
"SubscriptionLevelSaaSResources"
],
"operationId": "SaasSubscriptionLevel_Delete",
"description": "Deletes the specified SaaS.",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Delete Operation completed successfully."
},
"202": {
"description": "Accepted and the operation will complete asynchronously.",
"headers": {
"Location": {
"description": "The URL to check the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"format": "int32",
"type": "integer"
}
}
},
"204": {
"description": "Delete operation completed successfully."
},
"default": {
"description": "A response indicating an error.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Delete Subscription Level SaaS resource": {
"$ref": "./examples/saasSubscriptionLevel/SaasDelete.json"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.