-
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
Suppress INVALID_TYPE errors when the property is set to null value in the example #155
Comments
Let's check a few examples to see if the service is actually returning null or the example is wrong and should actually not have the property with null value in it. |
@amarzavery As we discussed this offline, on some lines of how should we tackle it right instead of going to the route or ignoring this, could you please add some context. Thanks! |
un-assigning as my focus would on #142 for next sprint. |
NOTE: We should not do this for all the model properties. This should be done only when
In this way we can handle the issue in a better way. |
Thanks @amarzavery I like the proposal, I'll look into this a bit more to prep a fix. |
Autorest supports x-nullable. It is a more generic extension that other tools mostly support as well. Hence Garrett thought of using the name |
thanks @amarzavery ok, then looks like we should use |
This StackOverflow link provides good explanation about requiredness |
Opening this issue to address Azure/azure-rest-api-specs#798 in OAV tool.
Since it's a swagger limitation to specify allowing null values, let's allow null to match any type when a property comes back with this value in a response. This way model validation should not report errors and avoids noise (we have seen a lot of case where the Azure service behaves this way, and no cases where a fix is expected on the service side).
The text was updated successfully, but these errors were encountered: