Adding Luis swagger files.#1833
Conversation
|
@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 |
veronicagg
left a comment
There was a problem hiding this comment.
Please take a look at CI, I'll post more comments soon.
|
@omarelhariry137 any updates on this PR fixing semantic validation failures: https://travis-ci.org/Azure/azure-rest-api-specs/jobs/286094532 ? |
|
@veronicagg Yes, they're done now. Sorry, for taking so long. |
|
@omarelhariry137 Regarding the allowed failures section:
|
|
@johanste @NiklasGustafsson please let me know if you'd like to review this PR, thanks! |
|
@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. |
|
Here are tools you can run locally (which CI is running) https://github.com/Azure/adx-documentation-pr/wiki/Azure-Swagger-Tools |
veronicagg
left a comment
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
you may want to end each description with "."
| "responses": { | ||
| "200": { | ||
| "description": "A JSON object containing the predictions", | ||
| "examples": { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
if parameters are shared among operations you could define them in global section and refer them from here.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameters-definitions-object
Make sure to include https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md#x-ms-parameter-location as needed.
| "responses": { | ||
| "200": { | ||
| "description": "A JSON object containing the predictions", | ||
| "examples": { |
There was a problem hiding this comment.
should there be a schema definition returned?
similar to https://github.com/Azure/azure-rest-api-specs/blob/current/specification/cognitiveservices/data-plane/Face/v1.0/Face.json#L52
| "/apps/{appId}/versions/{versionId}/patterns": { | ||
| "post": { | ||
| "description": "Creates a new pattern feature.", | ||
| "operationId": "features - Create pattern feature", |
There was a problem hiding this comment.
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": { |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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": "" |
There was a problem hiding this comment.
description should not be empty
| } | ||
| ], | ||
| "responses": { | ||
| "200": { |
There was a problem hiding this comment.
is this a pageable operaation? see https://github.com/Azure/autorest/blob/master/docs/extensions/readme.md#x-ms-pageable
|
@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. |
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