Skip to content

Update CognitiveServices/Text-Analytics Swagger with new /entities endpoint#2985

Merged
hovsepm merged 6 commits intoAzure:masterfrom
assafi:master
May 2, 2018
Merged

Update CognitiveServices/Text-Analytics Swagger with new /entities endpoint#2985
hovsepm merged 6 commits intoAzure:masterfrom
assafi:master

Conversation

@assafi
Copy link
Contributor

@assafi assafi commented May 1, 2018

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

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@msftclas
Copy link

msftclas commented May 1, 2018

CLA assistant check
All CLA requirements met.

@AutorestCI
Copy link

AutorestCI commented May 1, 2018

Automation for azure-libraries-for-java

The initial PR has been merged into your service PR:
AutorestCI/azure-libraries-for-java#136

@AutorestCI
Copy link

AutorestCI commented May 1, 2018

Automation for azure-sdk-for-node

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-node#2828

@AutorestCI
Copy link

AutorestCI commented May 1, 2018

Automation for azure-sdk-for-python

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-python#2522

@AutorestCI
Copy link

AutorestCI commented May 1, 2018

Automation for azure-sdk-for-go

The initial PR has been merged into your service PR:
Azure/azure-sdk-for-go#1769

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These 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

⚠️8 new Warnings.(45 total)
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.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These 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

⚠️0 new Warnings.(0 total)
0 new Errors.(2 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {
Copy link
Contributor

Choose a reason for hiding this comment

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

body [](start = 9, length = 4)

According to your swagger this parameter should be named as input and not body, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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." } ] }

Copy link
Contributor

Choose a reason for hiding this comment

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

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.' } ] }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Should be fixed now.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These 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

⚠️8 new Warnings.(45 total)
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.

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These 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

⚠️0 new Warnings.(0 total)
0 new Errors.(2 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@hovsepm
Copy link
Contributor

hovsepm commented May 2, 2018

@assafi please fix this issues as well:

{ 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 AzureRegion 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 Detect Language request" in operation "Detect Language".:
 
{ code: 'REQUEST_VALIDATION_ERROR',
  id: 'OAV109',
  message: 'Found errors in validating the request for x-ms-example "Successful Detect Language request" in operation "Detect Language".',
  innerErrors: 
   [ { code: 'REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND',
       id: 'OAV105',
       message: 'In operation "Detect Language", parameter AzureRegion 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 Sentiment request" in operation "Sentiment".:
 
{ code: 'REQUEST_VALIDATION_ERROR',
  id: 'OAV109',
  message: 'Found errors in validating the request for x-ms-example "Successful Sentiment request" in operation "Sentiment".',
  innerErrors: 
   [ { code: 'REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND',
       id: 'OAV105',
       message: 'In operation "Sentiment", parameter AzureRegion 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 AzureRegion is required in the swagger spec but is not present in the provided example parameter values.' } ] }

@azuresdkciprbot
Copy link

AutoRest linter results for ARM Related Validation Errors/Warnings

These 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

⚠️0 new Warnings.(0 total)
0 new Errors.(2 total)

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

AutoRest linter results for SDK Related Validation Errors/Warnings

These 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

⚠️8 new Warnings.(45 total)
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.

@hovsepm hovsepm merged commit 7b23c9f into Azure:master May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants