Skip to content

Adding Luis swagger files.#1833

Closed
omarelhariry137 wants to merge 2 commits intoAzure:currentfrom
omarelhariry137:luis/luisSwaggerFiles
Closed

Adding Luis swagger files.#1833
omarelhariry137 wants to merge 2 commits intoAzure:currentfrom
omarelhariry137:luis/luisSwaggerFiles

Conversation

@omarelhariry137
Copy link
Copy Markdown

@omarelhariry137 omarelhariry137 commented Oct 10, 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

  • 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

@veronicagg
Copy link
Copy Markdown
Contributor

@omarelhariry137 Please take a look at CI validation errors, semantic checks are failing - https://travis-ci.org/Azure/azure-rest-api-specs/jobs/286094532#L570

Copy link
Copy Markdown
Contributor

@veronicagg veronicagg left a comment

Choose a reason for hiding this comment

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

Please take a look at CI, I'll post more comments soon.

@veronicagg
Copy link
Copy Markdown
Contributor

@omarelhariry137 any updates on this PR fixing semantic validation failures: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/286094532 ?

@omarelhariry137
Copy link
Copy Markdown
Author

omarelhariry137 commented Oct 19, 2017

@veronicagg Yes, they're done now. Sorry, for taking so long.
I don't need to fix all the allowed failures section right ?

@veronicagg
Copy link
Copy Markdown
Contributor

@omarelhariry137 Regarding the allowed failures section:

@veronicagg
Copy link
Copy Markdown
Contributor

@johanste @NiklasGustafsson please let me know if you'd like to review this PR, thanks!

@veronicagg
Copy link
Copy Markdown
Contributor

@omarelhariry137 Regarding linter validation, please add a file similar to https://github.com/Azure/azure-rest-api-specs/blob/current/specification/cognitiveservices/data-plane/Face/readme.md under "Luis" folder, pointing to the files included in your PR.

@veronicagg
Copy link
Copy Markdown
Contributor

Here are tools you can run locally (which CI is running) https://github.com/Azure/adx-documentation-pr/wiki/Azure-Swagger-Tools

Copy link
Copy Markdown
Contributor

@veronicagg veronicagg left a comment

Choose a reason for hiding this comment

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

Left a bunch of comments inline - many of them apply to all operations, I commented once, so you can review all.
I'd also recommend generating SDK code using autorest https://github.com/Azure/autorest/blob/master/docs/user/cli.md#autorest-command-line-interface-documentation so you can preview what your SDK would look like.

{
"name": "appId",
"in": "path",
"description": "Format - guid. The application ID",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you may want to end each description with "."

"responses": {
"200": {
"description": "A JSON object containing the predictions",
"examples": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you could look into using x-ms-examples - https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/x-ms-examples.md#why-x-ms-examples
It allows multiple examples and you can put the example in a separate file.

"operationId": "v2.0 Response - Get predictions from endpoint (post)",
"parameters": [
{
"name": "appId",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"responses": {
"200": {
"description": "A JSON object containing the predictions",
"examples": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"/apps/{appId}/versions/{versionId}/patterns": {
"post": {
"description": "Creates a new pattern feature.",
"operationId": "features - Create pattern feature",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

operationID should be of a form similar to https://github.com/Azure/azure-rest-api-specs/blob/current/specification/cognitiveservices/data-plane/Face/v1.0/Face.json#L31
The string before the underscore "_" groups the operations in a class named that way (in code generation)
Something like "Features_CreatePattern"
The name is used for the generated method name.

"application/json": "83147"
}
},
"400": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you intending to throw and exception in generated code? Please see https://github.com/Azure/azure-rest-api-specs/blob/2fb9a0b3b902335ff0b0033711c234431931ec9d/documentation/creating-swagger.md#default-response on how autorest acts on default response and negative responses

"/{appId}": {
"get": {
"description": "Gets the published endpoint predictions for the given query",
"operationId": "v2.0 Response - Get predictions from endpoint",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

operationID should be of a form similar to https://github.com/Azure/azure-rest-api-specs/blob/current/specification/cognitiveservices/data-plane/Face/v1.0/Face.json#L31
The string before the underscore "_" groups the operations in a class named that way (in code generation)
Something like "Predictions_Get"
The name is used for the generated method name.

],
"responses": {
"200": {
"description": ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

description should not be empty

}
],
"responses": {
"200": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@veronicagg
Copy link
Copy Markdown
Contributor

@omarelhariry137 any updates on the PR? The PR will get closed by EOD due to inactivity. If so, you can reopen it and tag me when you get back to it.

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.

3 participants