-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Update WebApps swagger: correct host key create/update requests #17653
Conversation
Hi, @allenhumphreys Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com |
[Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks. |
Swagger Validation Report
|
Rule | Message |
---|---|
R4019 - GetCollectionResponseSchema |
The response in the GET collection operation 'AppServicePlans_ListVnets' does not match the response definition in the individual GET operation 'AppServicePlans_GetVnetFromServerFarm' . Location: Microsoft.Web/stable/2021-03-01/AppServicePlans.json#L884 |
Per the Noun_Verb convention for Operation Ids, the noun 'DeletedWebApps' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/DeletedWebApps.json#L106 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Diagnostics' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Diagnostics.json#L281 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Diagnostics' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Diagnostics.json#L334 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Diagnostics' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Diagnostics.json#L954 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Diagnostics' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Diagnostics.json#L1014 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Recommendations' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Recommendations.json#L102 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Recommendations' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Recommendations.json#L405 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'Recommendations' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/Recommendations.json#L712 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L118 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L161 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L206 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L267 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L313 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L375 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L432 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L488 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L558 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L608 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L660 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L718 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L781 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L844 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L901 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L955 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L1009 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L1066 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L1125 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L1206 |
|
Per the Noun_Verb convention for Operation Ids, the noun 'StaticSites' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Web/stable/2021-03-01/StaticSites.json#L1267 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
~[Staging] ApiReadinessCheck succeeded [Detail] [Expand]
️️✔️
ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
Cross-Version Breaking Changes succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⌛
SDK Track2 Validation pending [Detail]
️❌
PrettierCheck: 1 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
HowToFix |
Code style issues found path: Microsoft.Web/stable/2021-03-01/WebApps.json |
️️✔️
SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
Thank you for your contribution allenhumphreys! We will review the pull request and get back to you soon. |
Swagger Generation Artifacts
|
Hi @allenhumphreys, Your PR has some issues. Please fix the CI sequentially by following the order of
|
Hi @allenhumphreys, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review. |
NewApiVersionRequired reason: |
99abf3b
to
4ab3866
Compare
I know this is popping up as a breaking change, but it's really just aligning the swagger with the implementation. The generated methods, at least in the Go SDK, are unusable in their current form. The API throws a 400 if the |
Hi, @allenhumphreys. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove |
@msftbot i cannot remove labels |
It’s unfortunate no one looks at my issues |
Hi, @allenhumphreys. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove |
Someday, somewhere, someone might look at this |
Hi, @allenhumphreys. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove |
Hi |
@allenhumphreys wow - hoping we can get this merged, one day. |
@naveedaz : Are changes from public accepted by msft ? Any chance that PR will be reviewed and merged some day? |
@ArcturusZhang could you please take a look at this one? It's not a breaking change it's actually a fixing change |
@mathewc Can you please validate this change? |
These changes don't look right. They end up creating the following definition for KeyInfo: "KeyInfo": {
"description": "Function key info.",
"type": "object",
"required": [
"properties"
],
"properties": {
"name": {
"description": "Key name",
"type": "string"
},
"properties": {
"description": "Key properties",
"type": "object",
"properties": {
"value": {
"description": "Key value",
"type": "string"
}
}
}
}
} Currently you can PUT the following payload format to create a key, e.g. using ArmClient to test: PUT /subscriptions/mysub/resourceGroups/myrg/providers/Microsoft.Web/sites/mysite/host/default/systemkeys/testkey?api-version=2021-03-01 {
"properties": {
"name":"testkey",
"value":"abc123"
}
} So the APIs take a key payload with properties for name and value. And that's what the existing KeyInfo definition declares here: "KeyInfo": {
"description": "Function key info.",
"type": "object",
"properties": {
"name": {
"description": "Key name",
"type": "string"
},
"value": {
"description": "Key value",
"type": "string"
}
}
} |
@mathewc Thanks for looking at this. I think there might be some confusion we'll need to clear up and get to the bottom of. The existing KeyInfo declaration is meant to be the request body of However, the existing OpenAPI definition describes a model that looks like this: {
"name": "<keyname>",
"value":"<keyvalue>"
}
The above declaration says "An object, KeyInfo, has 2 properties, "name" and "value". The API actually expects "Any object, KeyInfo, with 1 property, "properties"; where the property "properties" has 2 properties, "name" and "value".
This is the change I made. And I think perhaps the confusion came in with the OpenAPI schema using "properties" in the way it does. Ultimately, the GoSDK generates a body like, which matches the existing spec for KeyInfo: {
"name": "<keyname>",
"value":"<keyvalue>"
} which is wrong and leads to the generated Go SDK being unable to call this API. Additional info from my investigation: Using the Azure CLI, I can make this API call using
Now, the Open API spec I've suggested doesn't match the body generated by the Azure CLI. However, when formulating my change I actually probed the API a little. I found that Hopefully this information helps! |
Thanks for the clarification @allenhumphreys. Yes, I see what you mean now. The request body for these APIs should indeed follow an ARM resource model schema, with a "properties" member containing the key name/value properties. The problem I see with making a direct change to the spec as in this PR is that it doesn't change it at the source resource definition (our internal codebase from which we generate this swagger). So next time we auto-gen swagger and update in this repo, your changes would get overridden. Instead, we should make the required change at the the source, so the correct swagger is generated by our tools. We have an annotation in our source for model types @naveedaz I've created a tracking item on the App Service side (Work Item 14770455) to make changes required on the service side so the swagger we generate is correct. |
@mathewc That makes perfect sense! I wasn't sure which direction the generation went, so I opened a PR to start a conversation hoping to get it fixed. Is there anything else I should do to help get it prioritized or picked up internally? |
+1 can you take a look? |
@allenhumphreys - no there isn't anything else you need to do. You opened the issue and created a draft PR (thanks!) which helped everyone understand the issue. What remains is for our control plane team to fix the issue on our side, and the swagger updates would then be part of our next scheduled update. Likely this PR should be closed at this point, and discussion going forward can happen on #14557 which links here and retains all the context. |
Thank you so much @mathewc ! I look forward to having this fixed and being able to add some key management to terraform azurerm provider in the future.! |
PR for swagger update is in progress on our side in our internal service repo. Will update here when progress is made. |
I'm very thankful for that status update @MatthewC ❤️ |
Hi, it seems that the changes made here haven't been propagated to the .NET SDK which still creates a body |
fixes #14557
This seems to be incorrect in every single WebApps API version. I have no idea if changes are accepted from the public. I'd like to get this fixed so the Go SDK can be used to create/update host keys.
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Changelog
Add a changelog entry for this PR by answering the following questions:
Contribution checklist:
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Otherwise your PR may be subject to ARM review requirements. Complete the following:
Check this box if any of the following apply to the PR so that label "WaitForARMFeedback" will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.
-[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.
Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.
If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Breaking Change Review Checklist
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.