Yelp / swagger-spec-compatibility

Python library to check Swagger Spec backward compatibility
https://swagger-spec-compatibility.readthedocs.org
Apache License 2.0
20 stars 8 forks source link

Implement detection rules for adding / removing x-nullable attribute #22

Open macisamuele opened 4 years ago

macisamuele commented 4 years ago

Changing the nullability of an object or property might lead to backward incompatible specs.

For easier understanding we can use the following example

definitions:
  model:
    type: object
    x-model: Model
    properties:
      prop:
        type: string

with the above example we should consider {"prop": "a"} or {} as valid Model and {"prop": null} as invalid. But adding x-model: true into prop property it makes {"prop": null} a valid Model.

This change is:

The objective of this issue is to track the implementation of two complementary rules

Internal reference: CORESERV-9265