-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[key vault] make key-version path parameter required for get key #9860
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
Swagger pipeline restarted successfully, please wait for status update in this comment. |
Azure Pipelines successfully started running 1 pipeline(s). |
Azure CLI Extension Generation - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-go - Release
|
azure-sdk-for-net - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
Trenton Generation - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-python - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-js - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
azure-sdk-for-java - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
Can one of the admins verify this patch? |
Yep,
|
But it's never actually been required. Our SDK even treats it as optional. If you don't specify it, the "latest" is assumed which is the correct behavior. This was changed to reflect reality. |
Talking with @iscai-msft offline, I see this path parameters are required to be |
My interpretation is that if a path parameter is meant to optional, you should use a separate definition for |
This should be two paths - one with version, one without. Path parameters are indeed required. |
We need our REST API docs to represent reality. So customers know how to use our API. Today version is optional across REST API, SDKs. |
But it is two different endpoints/routes:
and
and should in reality be described as such in order to have a valid openapi document. Given that this invalid openapi document accidentally "worked" before, we do have a problem here in that we probably want to keep a single overload of the method in generated code. Ideally, we can correct the document so that it is actually valid without changing what code gets generated. |
Given the alternative, making this |
Azure Pipelines successfully started running 1 pipeline(s). |
Once we on it, can we just use the same comment across all types and propagate across future versions 7.1 and 7.2, so it is not lost. |
Will do. @jlichwa when you say "across all types", do you mean key-version is always optional across all operations? |
@iscai-msft I meant that same logic applies for all types:operations: GetCertificate,GetSecret . So we can add this comment to those too:"Though listed as required following OpenAPI guidelines for path parameters, actually optional on the server, which assumes 'latest' if not provided." If we can copy paste this comment to above types, that would be very beneficial |
…n version 7.0 and up
Azure Pipelines successfully started running 1 pipeline(s). |
@jlichwa added the clarifying comment to GetKey, GetSecret, and GetCertificate for API version 7.0, 7.1-preview, and 7.2-preview. Let me know if the fixes are good, thanks! |
azure-sdk-for-python-track2 - Release
No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured
|
That is great. Thank you so much |
I have some reserves about using the following as documentation:
The vast majority of readers don't know or don't care about OpenAPI. When they read, they want to learn exact semantics of this API, regardless of standards. Therefore I think we should document as something like:
|
@msfcolombo I see where you're coming from, I'll change the comment to that for better customer readability. Thanks! |
Azure Pipelines successfully started running 1 pipeline(s). |
@msfcolombo, implemented the changes you requested. lmk what you think! |
…into fix_7.0_keyvault * 'master' of https://github.com/Azure/azure-rest-api-specs: Security domain backup restore REST OpenAPI specification (#9647) Revert PYthon Directive Change (#9801) test-costmanagement-automation (#9864) 1. Marked "sessionId" as required property in DataFlowDebugCommandRequest (#9850) updated containerinstance owner (#9856)
Azure Pipelines successfully started running 1 pipeline(s). |
…re#9860) * make key version required for get key * fix description * add clarifying comment about version path parameter to Get* methods in version 7.0 and up * remove references to OpenAPI version in version path parameter desccription
The fix that added this broke autorest generation. This is because path parameters need to be required here's the swagger link describing this. Since
key-version
is required for all of the other calls in 7.0, and becausegetKey
also haskey-version
as required in the other versions (i.e., 7.1-preview), I'm switching it back to required