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

Adding VirtualWan Swagger #3204

Merged
merged 10 commits into from
Jun 20, 2018
Merged

Conversation

priyanag
Copy link
Contributor

@priyanag priyanag commented Jun 8, 2018

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

@AutorestCI
Copy link

AutorestCI commented Jun 8, 2018

Automation for azure-libraries-for-java

A PR has been created for you:
AutorestCI/azure-libraries-for-java#237

@AutorestCI
Copy link

AutorestCI commented Jun 8, 2018

Automation for azure-sdk-for-node

Encountered a Subprocess error: (azure-sdk-for-node)

Command: ['/usr/local/bin/autorest', '/tmp/tmpwzd1cpo0/rest/specification/network/resource-manager/readme.md', '--license-header=MICROSOFT_MIT_NO_VERSION', '--node-sdks-folder=/tmp/tmpwzd1cpo0/sdk', '--nodejs', '--use=@microsoft.azure/autorest.nodejs@^2.1.43']
Finished with return code 1
and output:

AutoRest code generation utility [version: 2.0.4262; node: v7.10.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest

There is a new version of AutoRest available (2.0.4280).
 > You can install the newer version with with npm install -g autorest@latest

   Loading AutoRest core      '/root/.autorest/@microsoft.azure_autorest-core@2.0.4278/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4278)
   Loading AutoRest extension '@microsoft.azure/autorest.nodejs' (^2.1.43->2.1.59)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.44->2.3.44)
Shutting Down
Shutting Down
FATAL: nodejs/generate - FAILED
FATAL: Error: [Exception] AutoRest extension '@microsoft.azure/autorest.nodejs' terminated.
Process() cancelled due to exception : [Exception] AutoRest extension '@microsoft.azure/autorest.nodejs' terminated.

@AutorestCI
Copy link

AutorestCI commented Jun 8, 2018

Automation for azure-sdk-for-python

A PR has been created for you:
Azure/azure-sdk-for-python#2756

@AutorestCI
Copy link

AutorestCI commented Jun 8, 2018

Automation for azure-sdk-for-ruby

Nothing to generate for azure-sdk-for-ruby

@priyanag
Copy link
Contributor Author

priyanag commented Jun 9, 2018

This is the original PR that was signed off by ARM team and the Azure-Rest-APi-Specs reviewer: https://github.com/Azure/azure-rest-api-specs-pr/pull/372

@AutorestCI
Copy link

AutorestCI commented Jun 9, 2018

Automation for azure-sdk-for-go

A PR has been created for you:
Azure/azure-sdk-for-go#2091

@MikhailTryakhov
Copy link
Contributor

@priyanag please review error in CI

@MikhailTryakhov
Copy link
Contributor

MikhailTryakhov commented Jun 12, 2018

@priyanag there are still issues in CI. please ping me when they all would pass.
Please note that expected code freeze date is June 13

@jianghaolu jianghaolu added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Jun 12, 2018
Copy link
Contributor

@ravbhatnagar ravbhatnagar left a comment

Choose a reason for hiding this comment

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

@priyanag - This has already been reviewed long back, correct? I am assuming this is just putting the APis in public repo? I took a quick glance and it looked ok. Please let me know if there is some delta between what was last reviewed or any specific areas you would like me to focus on. Otherwise looks fine. Just one minor note.

}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration": {
Copy link
Contributor

Choose a reason for hiding this comment

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

action name not indicative of an action. Should it be something like listvpnSiteConfiguration etc.?

Copy link
Contributor Author

@priyanag priyanag Jun 14, 2018

Choose a reason for hiding this comment

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

Yes, this has already been reviewed and signed-off by ARM few months, now just making this public. Here is the PR that was signed off by ARM: https://github.com/Azure/azure-rest-api-specs-pr/pull/372

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By action-name are you referring to the operationId?

}
}
},
"GetVpnSitesConfigurationRequest": {
Copy link
Contributor

Choose a reason for hiding this comment

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

great, and now there will be linked access check on the vpnSites passed in the body?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

@jianghaolu jianghaolu left a comment

Choose a reason for hiding this comment

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

virtualwan.json is an invalid JSON - please fix it first so that I can wrong further validations.

"$ref": "#/definitions/VpnConnection"
},
"description": "Parameters supplied to create or Update a VPN Connection."
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the extra ','

"sharedKey": "key"
}
},
"202": {
Copy link
Contributor

Choose a reason for hiding this comment

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

"202" is not defined as a valid response for this operation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also sample response for 201 is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we don't want 202 response. Only 200, 201 and default response.

@@ -0,0 +1,42 @@
{
"parameters": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing required parameter "connectionName".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correcting

@@ -0,0 +1,14 @@
{
"parameters": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Required parameter "connectionName" missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correcting

@@ -60,6 +60,7 @@ input-file:
- Microsoft.Network/stable/2018-06-01/virtualNetworkGateway.json
- Microsoft.Network/stable/2018-06-01/vmssNetworkInterface.json
- Microsoft.Network/stable/2018-06-01/vmssPublicIpAddress.json
- Microsoft.Network/stable/2018-06-01/virtualWan.json
Copy link
Contributor

Choose a reason for hiding this comment

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

should we sort this alphabetically? @jianghaolu, please confirm if so.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's necessary though if it seems more organized to service team then it would be nice to have.

@EvgenyAgafonchikov
Copy link
Contributor

Suppression in readme.md need to be updated to suppress "RequiredPropertiesMissingInResourceModel" errors in the added file.
Also, please fix warnings of kind "model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element"
You may use azure-rest-api-specs\specification\network\resource-manager>autorest --azure-validator --openapi-type=arm to check the above.

Please also run oav validate-example Microsoft.Network\stable\2018-06-01\virtualWan.json and fix listed examples issues.

},
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans": {
"get": {
"operationId": "VirtualWANs_ListBySubscriptionId",
Copy link
Contributor

Choose a reason for hiding this comment

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

@jianghaolu, is it common naming for now? As I remember previously it was ListByResourceGroup+List pair. Was this changed recently?

Copy link
Contributor

Choose a reason for hiding this comment

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

No this should be `VirtualWANs_List". Good catch!

},
"nextLink": {
"type": "string",
"des
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, unable to figure out where?

Copy link
Contributor

Choose a reason for hiding this comment

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

provisisoning -> provisioning

},
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites": {
"get": {
"operationId": "VpnSites_ListBySubscriptionId",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename to VpnSites_List

},
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs": {
"get": {
"operationId": "VirtualHubs_ListBySubscriptionId",
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

},
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways": {
"get": {
"operationId": "VpnGateways_ListBySubscriptionId",
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

"resourceGroupName": "rg1",
"api-version": "2018-06-01",
"subscriptionId": "subid",
"VpnConnectionParameters": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Here: "vpnConnectionParameters"

@@ -0,0 +1,68 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this example being referenced anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing

"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "VpnSiteParameters",
Copy link
Contributor

Choose a reason for hiding this comment

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

Some of your parameter names are camel cased, some are pascal cased. We recommend having the parameter names camel cased.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaving them as is.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure - but in the case of VpnConnections_CreateOrUpdate it's mismatching - the parameter name is vpnConnectionParameters but VpnConnectionParameters in the example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure- fixing that. Also, as per the suggestion by @MikhailTryakhov changing the Api version to 2018-04-01 for this swagger and hence moving everything to 2018-04-01 folder.

@AutorestCI
Copy link

AutorestCI commented Jun 20, 2018

Automation for azure-sdk-for-java

Nothing to generate for azure-sdk-for-java

@priyanag
Copy link
Contributor Author

@MikhailTryakhov @ravbhatnagar @jianghaolu - I am targeting to close this PR today. Kindly help with the review. :)

@ravbhatnagar
Copy link
Contributor

Looks good.

@ravbhatnagar ravbhatnagar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jun 20, 2018
Copy link
Contributor

@MikhailTryakhov MikhailTryakhov left a comment

Choose a reason for hiding this comment

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

Please provide autorest validator result, correct PR checklist "Validation tools were run...." and sign off that results are OK. Looks like CI doesn't contains this script anymore...

@jianghaolu
Copy link
Contributor

@MikhailTryakhov I'm not sure I understand what exactly you are looking for. Do you have an example?

@MikhailTryakhov
Copy link
Contributor

@jianghaolu example how to run autorest validator? it's:
autorest <proj directory>\azure-rest-api-specs\specification\network\resource-manager\readme.md --azure-validator=true --validation --message-format=json

@MikhailTryakhov MikhailTryakhov merged commit 2c50de6 into Azure:Network-2018-06-01 Jun 20, 2018
MikhailTryakhov added a commit to EvgenyAgafonchikov/azure-rest-api-specs that referenced this pull request Jun 20, 2018
* Adding VirtualWan Swagger

* Adding the CRUD Apis for VpnConnections

* Updating VpnGateway examples

* Fixing build errors

* Addressing comments

* Addressing comments and editing VpnConnection definition and corresponding examples

* Addressing comments

* Removing enableRateLimiting property

* Addressing comments

* Changing the version to 2018-04-01 version
lmazuel pushed a commit that referenced this pull request Jun 21, 2018
…1) (#3261)

* Added Network 2018-06-01; VM ref fix (#3118)

* Init 2018-06-01 (copy from 2018-05-01)

* Make VM reference in NIC readonly

* Updated version in readme

* New VPN Client Protocol (#3133)

* Added new VPN protocol

* indents

* Add examples for Express Route Circuit APIs (#3182)

* Add examples for Express Route Circuit APIs

* Fix errors in expressRouteCircuit.json validations

* Fix errors in validate examples for ExR Circuit

* appgwv2 changes (#3192)

* AppGW FIPS mode (#3202)

* Release of Azure Networking Network-2018-06-01 branch (api-version 2018-04-01)

* Adding VirtualWan Swagger (#3204)

* Adding VirtualWan Swagger

* Adding the CRUD Apis for VpnConnections

* Updating VpnGateway examples

* Fixing build errors

* Addressing comments

* Addressing comments and editing VpnConnection definition and corresponding examples

* Addressing comments

* Removing enableRateLimiting property

* Addressing comments

* Changing the version to 2018-04-01 version

* Suppress ConnectionSharedKey model issue

* Reverted extra-changes in readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants