-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[ADLS] Adding vnet to read-only account properties and test examples for each API #3055
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
Conversation
AutoRest linter results for ARM Related Validation Errors/WarningsThese errors are reported by the ARM team's validation tools, reachout to ARM RP API Review directly for any questions or concerns. File: specification/datalake-analytics/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| TrackedResourceListByImmediateParent | R3010 | Link | The child tracked resource, 'virtualNetworkRules' with immediate parent 'DataLakeStoreAccount', must have a list by immediate parent operation. |
❌0 new Errors.(0 total)
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
AutoRest linter results for SDK Related Validation Errors/WarningsThese errors are reported by the SDK team's validation tools, reachout to ADX Swagger Reviewers directly for any questions or concerns. File: specification/datalake-analytics/resource-manager/readme.md
|
| Code | Id | Source | Message |
|---|---|---|---|
| PutRequestResponseScheme | R2017 | Link | A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'VirtualNetworkRules_CreateOrUpdate' Request Model: 'CreateOrUpdateVirtualNetworkRuleParameters' Response Model: 'VirtualNetworkRule' |
❌0 new Errors.(0 total)
AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback
Thanks for your co-operation.
| "$ref": "#/definitions/VirtualNetworkRule" | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a long running operation? if so model this operation as LRO.
| "schema": { | ||
| "$ref": "#/definitions/VirtualNetworkRule" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a long running operation? if so model this operation as LRO.
| "description": "The specified virtual network rule does not exist or was already deleted." | ||
| } | ||
| }, | ||
| "x-ms-examples": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a long running operation? if so model this operation as LRO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. these vnet rule APIs are not async, so I think no need to model as LRO.
|
@ravbhatnagar can you please take a look, this PR introduces CRUD on network rules. |
|
any more comments are appreciated. Thanks |
| "properties" | ||
| ], | ||
| "properties": { | ||
| "name": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name MUST come from the URL. It should not be present in the request body. In request body, it should be marked s readonly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like on the PUT of account, you are providing the option of creating a virtualNetworkRule. This is not supported. VirtualNetworkRule must be explicitly created by doing a PUT on this type. If needed, It can be referenced in the parent resource using the resourceId.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To the second comment, I agree that the most standard way is to only allow the nested resource creation/update through nested resource APIs. However in our service we are providing an additional way that users can also create/update nested resources through the top level resource APIs. This is more a historical thing from the very beginning of our service. For now I guess we still want to keep it to have the consistency with other nested resource types we already have. Going forward in the next major API version upgrade, I think we can consider to go the most standard way.
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/CreateOrUpdateVirtualNetworkRuleParameters" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same model can be used between request and response by marking the appropriate properties as readonly if they are not allowed to be set in the request but are present in response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravbhatnagar This is surely one way to design this. The design we took, however, was this type of model for all API requests. Changing it to your suggested model would create inconsistency. This is something that @lewu-msft can consider for a future design revamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes usability difficult from a client point of view. It makes the GET-PUT pipeline harder from the clients. I am fine with this if the SDK team is ok with this. @anuchandy FYI
|
Signing off. One major thing noted in the review was PUT on parent creating the child. This is an antipattern in ARM. But RP has this model for other resource types as well and would want to continue this. In the next api-version, RP should fix this. |
Automation for azure-sdk-for-nodeA PR has been created for you: |
Automation for azure-libraries-for-javaA PR has been created for you: |
Automation for azure-sdk-for-pythonA PR has been created for you: |
Automation for azure-sdk-for-goA PR has been created for you: |
|
@AutorestCI build azure-sdk-for-java |
|
I didn't understand your command: build azure-sdk-for-javain this context, sorry :(
|
4 similar comments
|
I didn't understand your command: build azure-sdk-for-javain this context, sorry :(
|
|
I didn't understand your command: build azure-sdk-for-javain this context, sorry :(
|
|
I didn't understand your command: build azure-sdk-for-javain this context, sorry :(
|
|
I didn't understand your command: build azure-sdk-for-javain this context, sorry :(
|
|
I didn't understand your command: build azure-sdk-for-javain this context, sorry :(
|
|
@AutorestCI regenerate azure-sdk-for-java |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
For ADLS management plane, added vnet to read-only account properties. added test examples for each API. fixed some example links.
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