-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Add swagger spec for spell check API #1997
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
Conversation
jhendrixMSFT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples need to be hooked up to the operations, see this for an example.
| }, | ||
| "x-ms-examples": { | ||
| "Successful query": { | ||
| "$ref": "./examples//SuccessfulSpellModeRequest.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra forward slash.
| "$ref": "./examples//SuccessfulSpellModeRequest.json" | ||
| }, | ||
| "Successful Proof Mode query": { | ||
| "$ref": "./examples//SuccessfulProofModeRequest.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra forward slash.
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "Spell Check API - v7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(discussed with @amarzavery as well)
Please change to Spell Check API (you can put v7 in the description if you'd like)
| } | ||
| }, | ||
| "definitions": { | ||
| "SpellCheck": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this one to SpellCheckModel (to avoid a conflict with the operation ID)
(checked with @amarzavery)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So "SpellCheck" appears to be the name of a schema in swagger that I only share. Would it be acceptable to change the operation ID instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So "SpellCheck" appears to be the name of a schema in swagger that I only share.
Can you explain a bit more on this?
The model name is just a logical name given to the schema so that customers can refer to it when using the SDK. It has no bearing on the REST API. If someone is using the REST API directly then they would not provide the model name but provide a sample based on the schema.
I can foresee that this could be a problem with discriminators. However, we have "x-ms-discriminator-value": "SpellCheck" to your rescue for that model definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The model name is just a logical name given to the schema so that customers can refer to it when using the SDK." -> I intended to say, I do not own this schema. :) I only use it. So I am hesitant to change this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we discussed offline, I changed the name of the operationID
| }, | ||
| { | ||
| "name": "Mode", | ||
| "in": "formData", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You doc says that mode is query:
https://dev.cognitive.microsoft.com/docs/services/5f7d486e04d2430193e1ca8f760cd7ed/operations/56e73036cf5ff81048ee6727
Could you confirm it's formData?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We support only "Post" http methods through this SDK and "Mode" can be a post body parameter. It appears like we can specify "Mode" as either a header or as a body parameter. In such cases, we have decided to use it as a "body" parameter for our post method based SDK.
lmazuel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Generated and tested in Python already FYI:
https://github.com/Azure/azure-sdk-for-python/tree/master/azure-cognitiveservices-language-spellcheck
package.json
Outdated
| "scripts": { | ||
| "test": "mocha -t 500000" | ||
| }, | ||
| "dependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was unintentional.
|
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
Packages.json change here was unintentionally added to this review
|
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
|
No modification for AutorestCI/azure-sdk-for-node |
|
No modification for AutorestCI/azure-sdk-for-python |
|
No modification for AutorestCI/azure-sdk-for-ruby |
* Video Swagger API: update example response json to remove special invalid special characters (#2015) * Add Video Search API Swagger * Video Swagger API: update example response json to remove special invalid special characters * take changes from azure-rest-spec-pr, make Microsoft.Subscription tenant level rp (#1984) * Fix bad merge. (#2022) * Add list apis for sql backup LTR policies & vaults (#2006) * Add list LTR vaults & policies * Added pageable * Change output folder for Search SDKs (#2023) * update output folders in readmes * rename with bing in name * App Model for Tumbling window trigger (#2028) * App model for tumbling window trigger * Addressed CR comments * Renamed retry to count in RetryPolicy * swagger definition for 26 RFI connectors (#2016) * Updated OMS data plane C# namespace & output-folder (#2021) * Update Azure Batch enum to use "values" - also some documentation updates (#2008) * Enum fixes * Improve DataDisks documentation * Update NATPool port range documentation * [Compute] Update Sku APIs (#2034) * Initial commit of 2017-12-01 compute.json * Changes for new API version 2017-12-01 compute.json * Add Compute SKU APIs * Add swagger spec for spell check API (#1997) * Add swagger spec for spell check API * Add Examples to spec * Remove redundant forward slash in path. Specify array from body parameters. * Fix oav errors * Remove x-Bing_Apis-SDK * Change spec to reflect what objects we want to expose in the response. * Fix operationId name to avoid conflict with "SpellCheck" schema. * Add X-BingApis-SDK back. * Remove Unintentional change Packages.json change here was unintentionally added to this review
* [Network-2017-11-01] Pull latest from current (#2039) * Video Swagger API: update example response json to remove special invalid special characters (#2015) * Add Video Search API Swagger * Video Swagger API: update example response json to remove special invalid special characters * take changes from azure-rest-spec-pr, make Microsoft.Subscription tenant level rp (#1984) * Fix bad merge. (#2022) * Add list apis for sql backup LTR policies & vaults (#2006) * Add list LTR vaults & policies * Added pageable * Change output folder for Search SDKs (#2023) * update output folders in readmes * rename with bing in name * App Model for Tumbling window trigger (#2028) * App model for tumbling window trigger * Addressed CR comments * Renamed retry to count in RetryPolicy * swagger definition for 26 RFI connectors (#2016) * Updated OMS data plane C# namespace & output-folder (#2021) * Update Azure Batch enum to use "values" - also some documentation updates (#2008) * Enum fixes * Improve DataDisks documentation * Update NATPool port range documentation * [Compute] Update Sku APIs (#2034) * Initial commit of 2017-12-01 compute.json * Changes for new API version 2017-12-01 compute.json * Add Compute SKU APIs * Add swagger spec for spell check API (#1997) * Add swagger spec for spell check API * Add Examples to spec * Remove redundant forward slash in path. Specify array from body parameters. * Fix oav errors * Remove x-Bing_Apis-SDK * Change spec to reflect what objects we want to expose in the response. * Fix operationId name to avoid conflict with "SpellCheck" schema. * Add X-BingApis-SDK back. * Remove Unintentional change Packages.json change here was unintentionally added to this review * Add 2017-11-01 folder in microsoft.network (#2019) * Video Swagger API: update example response json to remove special invalid special characters (#2015) * Add Video Search API Swagger * Video Swagger API: update example response json to remove special invalid special characters * take changes from azure-rest-spec-pr, make Microsoft.Subscription tenant level rp (#1984) * Fix bad merge. (#2022) * Add 2017-11-01 folder in microsoft.network * Add Ip Tags into Swagger (#2145) * add iptags for publicip in 2017-11-01 * read me changes for 2017-11-01 * Add Python conf for Network 2017-11-01 * Complete Python conf for 2017-11-01 * Updated LB InboundNatPool API (#2150) * Revert "[Network-2017-11-01] Pull latest from current (#2039)" This reverts commit a0257f9. * Moving to stable folder to account for refactoring changes in dec 2017
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