Update CognitiveServices/Text-Analytics Swagger with new /entities endpoint#2985
Update CognitiveServices/Text-Analytics Swagger with new /entities endpoint#2985hovsepm merged 6 commits intoAzure:masterfrom
Conversation
Automation for azure-libraries-for-javaThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-pythonThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/cognitiveservices/data-plane/TextAnalytics/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| ListInOperationName | R1003 | Link | Since operation 'Entities' response has model definition 'array', it should be of the form "_list". Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntitiesBatchResult' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntitiesBatchResultItem' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntityRecord' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'MatchRecord' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'documents' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'errors' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| ParameterNotDefinedInGlobalParameters | R2015 | Link | Parameter "api-version" is referenced but not defined in the global parameters section of Service Definition |
❌0 new Errors.(1 total)
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/cognitiveservices/data-plane/TextAnalytics/readme.md
|
| { | ||
| "parameters": { | ||
| "Ocp-Apim-Subscription-Key": "{API key}", | ||
| "body": { |
There was a problem hiding this comment.
body [](start = 9, length = 4)
According to your swagger this parameter should be named as input and not body, right?
There was a problem hiding this comment.
No. input and body are not part of the request body. I think this is just a reference ID for the example body which has a documents root object. I have followed the same pattern as existing endpoints (the input for all is the same).
There was a problem hiding this comment.
Here's an example request body:
{
"documents": [
{
"language": "en",
"id": "1",
"text": "Microsoft released Windows 10"
},
{
"language": "en",
"id": "2",
"text": "In 1975, Bill Gates III and Paul Allen founded the company."
}
]
}
There was a problem hiding this comment.
and I think all your samples are flagged as wrong
{ code: 'REQUEST_VALIDATION_ERROR',
id: 'OAV109',
message: 'Found errors in validating the request for x-ms-example "Successful Key Phrase request" in operation "Key Phrases".',
innerErrors:
[ { code: 'REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND',
id: 'OAV105',
message: 'In operation "Key Phrases", parameter input is required in the swagger spec but is not present in the provided example parameter values.' } ] }
error: Found errors in validating the request for x-ms-example "Successful Key Phrase request" in operation "Detect Language".:
{ code: 'REQUEST_VALIDATION_ERROR',
id: 'OAV109',
message: 'Found errors in validating the request for x-ms-example "Successful Key Phrase request" in operation "Detect Language".',
innerErrors:
[ { code: 'REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND',
id: 'OAV105',
message: 'In operation "Detect Language", parameter input is required in the swagger spec but is not present in the provided example parameter values.' } ] }
error: Found errors in validating the request for x-ms-example "Successful Key Phrase request" in operation "Sentiment".:
{ code: 'REQUEST_VALIDATION_ERROR',
id: 'OAV109',
message: 'Found errors in validating the request for x-ms-example "Successful Key Phrase request" in operation "Sentiment".',
innerErrors:
[ { code: 'REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND',
id: 'OAV105',
message: 'In operation "Sentiment", parameter input is required in the swagger spec but is not present in the provided example parameter values.' } ] }
error: Found errors in validating the request for x-ms-example "Successful Entities request" in operation "Entities".:
{ code: 'REQUEST_VALIDATION_ERROR',
id: 'OAV109',
message: 'Found errors in validating the request for x-ms-example "Successful Entities request" in operation "Entities".',
innerErrors:
[ { code: 'REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND',
id: 'OAV105',
message: 'In operation "Entities", parameter input is required in the swagger spec but is not present in the provided example parameter values.' } ] }
There was a problem hiding this comment.
Thanks. Should be fixed now.
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/cognitiveservices/data-plane/TextAnalytics/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| ListInOperationName | R1003 | Link | Since operation 'Entities' response has model definition 'array', it should be of the form "_list". Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntitiesBatchResult' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntitiesBatchResultItem' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntityRecord' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'MatchRecord' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| ParameterNotDefinedInGlobalParameters | R2015 | Link | Parameter "api-version" is referenced but not defined in the global parameters section of Service Definition |
| DescriptionAndTitleMissing | R4000 | Link | 'documents' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'errors' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
❌0 new Errors.(1 total)
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/cognitiveservices/data-plane/TextAnalytics/readme.md
|
|
@assafi please fix this issues as well: |
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/cognitiveservices/data-plane/TextAnalytics/readme.md
|
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/cognitiveservices/data-plane/TextAnalytics/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| ListInOperationName | R1003 | Link | Since operation 'Entities' response has model definition 'array', it should be of the form "_list". Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntitiesBatchResult' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntitiesBatchResultItem' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'EntityRecord' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'MatchRecord' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| ParameterNotDefinedInGlobalParameters | R2015 | Link | Parameter "api-version" is referenced but not defined in the global parameters section of Service Definition |
| DescriptionAndTitleMissing | R4000 | Link | 'documents' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
| DescriptionAndTitleMissing | R4000 | Link | 'errors' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation. |
❌0 new Errors.(1 total)
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-versionin the path should match theapi-versionin the spec).Quality of Swagger