Skip to content
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

Some APIs do not have terminal response definition - Added code to fix it. #814

Merged
merged 4 commits into from
Jan 17, 2017

Conversation

sarangan12
Copy link
Member

@sarangan12 sarangan12 commented Dec 19, 2016

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

  • I have read the contribution guidelines.
  • My spec meets the review criteria:
    • The spec conforms to the Swagger 2.0 specification.
    • Validation errors from the Linter extension for VS Code have all been fixed for this spec. (Note: for large, previously checked in specs, there will likely be many errors shown. Please contact our team so we can set a timeframe for fixing these errors if your PR is not going to address them).
    • The spec follows the patterns described in the Swagger good patterns document unless the service API makes this impossible.

Related to issue: Azure/azure-sdk-for-ruby#566

@amarzavery @veronicagg @vishrutshah @salameer Please review.

@azurecla
Copy link

Hi @sarangan12, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (sarajama). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@@ -4561,6 +4681,14 @@
}
},
"x-ms-azure-resource": true
},
"GenericOkResponse": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a better name for the model. This will be the return type for all the POST (action) operations?
How about OperationStatus ?

},
"GenericOkResponse": {
"properties": {
"status": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This model also contains other properties like

  • startTime
  • endTime
  • name

Why are they not modeled over here?

@amarzavery
Copy link
Contributor

@sarangan12 - Can you please resolve the comments made in the PR?

"description": "",
"schema": {
"$ref": "#/definitions/GenericOkResponse"
}
}
},
"x-ms-long-running-operation": true
Copy link
Contributor

Choose a reason for hiding this comment

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

As per the swagger rule M2005, seems like they are describing that for delete operation valid terminal success status codes are "204 or 200 or both for delete".

Either the rule is not complete or something i am misunderstanding.
@amarzavery / @sarangan12 Could one of you please clarify?

Copy link
Contributor

Choose a reason for hiding this comment

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

@amarzavery Any thoughts on this one?

@sarangan12
Copy link
Member Author

@amarzavery Can you please review the updated swagger?

@sarangan12
Copy link
Member Author

@amarzavery

Snapshots attached to indicate the output as a result of this change.

parsed_response_obtained_from_server

response_after_serializing

generated_job_response_model

@AutorestCI
Copy link

@AutorestCI
Copy link

@AutorestCI
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants