-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support x-ms-mutability #239
Comments
At present oav does not understand x-ms-mutability extension. However, if password can have a null value then shouldn't password be marked as |
Password must have a non-null value for requests, and must have a null value for responses. Would |
Oh I see.. That makes perfect sense.. We will have to add support to oav to understand x-ms-mutability in that case. That would be super useful during live validation as well. /cc @vladbarosan, @salameer - This would be a very good feature to support. It will improve model and live validation checking. This is a fairly complex feature to implement. While implementing this we need to make sure how would x-nullable and x-ms-mutability play together. |
What's your recommendation for now? |
Reference this issue in the swagger PR and move forward. We shall triage this issue and prioritize this in the upcoming Sprint. |
In sql jobs.json we have a 'credential' type with property 'password' that is required for PUT requests but always null in responses (intentionally in order to protect the secret value). Therefore we have mutability set to create/update.
https://github.com/azure/azure-rest-api-specs/blob/master/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/jobs.json#L1953
Our example files correctly have
"password": null
in responses. Model validator is giving an error for this. I believe the error is incorrect.https://travis-ci.org/Azure/azure-rest-api-specs/jobs/369280815#L824
The text was updated successfully, but these errors were encountered: