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

Swagger change for listing virtual machines in a subscription by location #3984

Merged
merged 10 commits into from
Sep 25, 2018

Conversation

dochung4
Copy link
Contributor

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

  • [y] The title of the PR is clear and informative.
  • [y] 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.
  • [y] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • [y] If applicable, the PR references the bug/issue that it fixes.
  • [y] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@AutorestCI
Copy link

AutorestCI commented Sep 21, 2018

Automation for azure-sdk-for-js

Nothing to generate for azure-sdk-for-js

@AutorestCI
Copy link

AutorestCI commented Sep 21, 2018

Automation for azure-sdk-for-python

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

@AutorestCI
Copy link

AutorestCI commented Sep 21, 2018

Automation for azure-sdk-for-ruby

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

@AutorestCI
Copy link

AutorestCI commented Sep 21, 2018

Automation for azure-sdk-for-node

A PR has been created for you:
Azure/azure-sdk-for-node#3672

@AutorestCI
Copy link

AutorestCI commented Sep 21, 2018

Automation for azure-sdk-for-java

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

@AutorestCI
Copy link

AutorestCI commented Sep 21, 2018

Automation for azure-sdk-for-go

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-go#2815

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@lmazuel
Copy link
Member

lmazuel commented Sep 21, 2018

Hi @dochung4 !
Looks good to me! But please provide x-ms-examples for your new operation. There is a ton of model you can follow in the very same files, should not be difficult :)
Thanks!

@dochung4
Copy link
Contributor Author

Added an example

@lmazuel
Copy link
Member

lmazuel commented Sep 21, 2018

Thanks @dochung4 !
Please link all operations to their examples. For instance:

"x-ms-examples": {
"List all virtual machine images in a resource group.": {
"$ref": "./examples/ListImagesInAResourceGroup.json"
}
},

@lmazuel
Copy link
Member

lmazuel commented Sep 24, 2018

Hi @dochung4
Your examples does not match the Swagger description (two issues):
https://travis-ci.org/Azure/azure-rest-api-specs/jobs/432318420

Example:

  code: REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND
  id: OAV105
  message: >-
    In operation "VirtualMachines_ListByLocation", parameter location is
    required in the swagger spec but is not present in the provided example
    parameter values.

This means you need to add "location" in the paremeters section of the example

  code: OBJECT_ADDITIONAL_PROPERTIES
  params:
    - - allowExtensionOperations
  message: 'Additional properties not allowed: allowExtensionOperations'
  path: value/1/properties/osProfile
  title: /definitions/OSProfile

This means you example contains a node called allowExtensionOperations that is not described in the Swagger at all. If this node exists in the real server, please take this opportunity to add it in the right model. If this is a typo and this node does not exists in real server answer, please remove it from the example.

@lmazuel
Copy link
Member

lmazuel commented Sep 24, 2018

Side note, the PR looks good to me, I have no objection to merge once the examples errors are fixed. Thanks!

@dochung4
Copy link
Contributor Author

allowExtensionOperations is supported from 2018-06-01, so I removed it from the example for the previous API versions. I see that allowExtensionOperations has already been added to Swagger for 2018-06-01 and above, so I believe this should resolve the issue.

@dochung4 dochung4 closed this Sep 24, 2018
@dochung4 dochung4 reopened this Sep 24, 2018
@lmazuel
Copy link
Member

lmazuel commented Sep 24, 2018

Hi @dochung4
Last issue is the REQUIRED_PARAMETER_EXAMPLE_NOT_FOUND I mentioned earlier and we're good to merge :)

@dochung4
Copy link
Contributor Author

Updated "locations" to "location"

@lmazuel
Copy link
Member

lmazuel commented Sep 25, 2018

@dochung4 This is better, now the linter find the parameter. However, {location} is not a valid location... Please use something like eastus or real value.

Note that to avoid having to go back and forth with the CI, you can test your examples locally with OAV:
https://github.com/Azure/oav

But I think this time this is the last one, since the only error is a regexp matching precisely here.

@lmazuel lmazuel merged commit bd288d1 into Azure:master Sep 25, 2018
@lmazuel
Copy link
Member

lmazuel commented Sep 25, 2018

Thanks @dochung4 !

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.

4 participants