-
Notifications
You must be signed in to change notification settings - Fork 37
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
Breaking change false positive when adding "type: object" to schema with "properties" #208
Comments
With 'type:object' and without 'type' have different meaning, as without 'type:object' indicates that the model is any type. |
I don't disagree with your statement, but I believe that if |
In the below example, the model can be either an object with properties or any other type like string, int . This contract is instituted by autorest
|
I stand corrected! Apparently "properties" only applies if the instance is an object. Wow JSON Schema is a strange language. |
openapi-diff currently reports a breaking change when a schema that previously had no "type" field but did have "properties" adds "type: object" in the new API definition.
ref: Azure/azure-rest-api-specs#14830
A schema that contains "properties" should be considered to be implicitly "type: object" so making that explicit in the API definition should not be flagged as a breaking change.
The text was updated successfully, but these errors were encountered: