You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug
When splitting a schema into two schemas where one refers with allOf to the other the diff shows breaking change, even if the end structure is the same.
To Reproduce
Example schema old.yaml:
openapi: "3.0.0"info:title: Sample APIdescription: API description in Markdown.version: 1.0.0servers: []paths:/test:get:summary: Your GET endpointtags: []responses:'200':description: OKcontent:application/json:schema:$ref: '#/components/schemas/working'components:schemas:working:type: objectproperties:foo:type: stringbar:type: integer
Example schema new.yaml:
openapi: 3.0.0info:title: Sample APIdescription: API description in Markdown.version: 1.1.0servers: []paths:/test:get:summary: Your GET endpointtags: []responses:'200':description: OKcontent:application/json:schema:$ref: '#/components/schemas/working'operationId: get-testcomponents:schemas:working:allOf:- type: objectproperties:foo:type: string- $ref: '#/components/schemas/bar'bar:type: objectproperties:bar:type: integer
Result of docker run -v $(pwd):/tmp openapitools/openapi-diff:latest /tmp/old.yaml /tmp/new.yaml:
==========================================================================
== API CHANGE LOG ==
==========================================================================
Sample API
--------------------------------------------------------------------------
-- What's Changed ----------------------------------------------------------------------------- GET /test Return Type: - Changed 200 OK Media types: - Changed application/json Schema: Broken compatibility Changed property type: (object -> object)---------------------------------------------------------------------------- Result ---------------------------------------------------------------------------- API changes broke backward compatibility --------------------------------------------------------------------------
Expected behavior
The tool is expected to notice a change but not a breaking one since the allOf mapping results in the same schema after resolving.
The text was updated successfully, but these errors were encountered:
The bug
When splitting a schema into two schemas where one refers with allOf to the other the diff shows breaking change, even if the end structure is the same.
To Reproduce
Example schema old.yaml:
Example schema new.yaml:
Result of
docker run -v $(pwd):/tmp openapitools/openapi-diff:latest /tmp/old.yaml /tmp/new.yaml
:Expected behavior
The tool is expected to notice a change but not a breaking one since the allOf mapping results in the same schema after resolving.
The text was updated successfully, but these errors were encountered: