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

Update swagger for Custom Speech v2.0 and v3.0 (GA) #18151

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,10 @@
"Content-Type": "application/json"
},
"responses": {
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
Comment on lines -25 to -28
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft Mar 29, 2022

Choose a reason for hiding this comment

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

If I am not mistaken, error response should be

{
  "error": {
    "code":
    "message":
  }
}

https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors

But given it is GA, we cannot change it.

},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
"202": {
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/accuracytests/0000e4c4-0b0e-437f-b41d-bcfe7ebf7060",
"Operation-Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/accuracytests/0000e4c4-0b0e-437f-b41d-bcfe7ebf7060"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,9 @@
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/endpoints/8fa0669c-a01e-4693-ae3a-93baf40f26d9",
"Operation-Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/endpoints/8fa0669c-a01e-4693-ae3a-93baf40f26d9"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,9 @@
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"404": {
"headers": {},
"body": {
"code": "NotFound",
"message": "The specified entity cannot be found."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/endpoints/{endpointId}9cf1e320-41b1-41e6-bdd3-8fb27cb2c90a",
"Operation-Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/endpoints/{endpointId}9cf1e320-41b1-41e6-bdd3-8fb27cb2c90a"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,9 @@
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/models/827712a5-f942-4997-91c3-7c6cde35600b",
"Operation-Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/models/827712a5-f942-4997-91c3-7c6cde35600b"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,9 @@
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683",
"Operation-Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v2.0/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@
"responses": {
"204": {
"headers": {}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,6 @@
"responses": {
"204": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@
"responses": {
"204": {
"headers": {}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@
"responses": {
"204": {
"headers": {}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,6 @@
"responses": {
"204": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,6 @@
"responses": {
"204": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Loading