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
{{ message }}
Repository navigation
Spec transformation to stay backward-compatible #33
This is more a question or a feature request than a real issue.
We would like to try following approach:
Given two specifications (old.yaml and new.yaml) representing two versions (v1 and v2) of an API. They are similar (say 90% for example) but there are braking changes between the two specs.
There could be a way to compute a second version of old.yaml (say old2.yaml) containing only the backward-compatible changes that are requested in order to transform old.yaml into new.yaml.
Is this something that someone has already investigated?
I think that the diff computed by openapi-diff tool is a good basis to realise a tool like this.
Is someone else interested?
Thank you in advance for your feedback.
Do not hesitate to tell, if I am not clear enough about what I mean.
Maybe a first step is to have the possibility to apply a diff result on a specification.
Take spec1 and spec2: with the ChangedOpenApi object obtained with OpenApiCompare.fromSpecifications(spec1, spec2), when its content is applied to spec1, I should obtain spec2.
Hi, first thanks for this amazing tool <3
I am planning to have a CI step/job in one of my projects to check for backwards incompatible changes between an old spec and new one.
Reading the documentation I am a bit confused about how to do that without parsing the output result message.
I am not interested in the output in that particular step, I only want openapi-diff to exit with 0 if there are no breaking changes or with an error if there was breaking changes.
What would be the proper command for that? @quen2404
I would appreciate if you were using an other issue to ask a question, because this has nothing to do with this issue. I will be happy to discuss it with you and to help you.
Activity
quen2404 commentedon Mar 26, 2018
Yes it's a good idea. A tool which automate the generation of a backward compatible contract could be useful.
jmini commentedon Mar 28, 2018
Thank you for your feedback.
Maybe a first step is to have the possibility to apply a diff result on a specification.
Take
spec1andspec2: with theChangedOpenApiobject obtained withOpenApiCompare.fromSpecifications(spec1, spec2), when its content is applied tospec1, I should obtainspec2.itsjavi commentedon Apr 16, 2018
Hi, first thanks for this amazing tool <3
I am planning to have a CI step/job in one of my projects to check for backwards incompatible changes between an old spec and new one.
Reading the documentation I am a bit confused about how to do that without parsing the output result message.
I am not interested in the output in that particular step, I only want
openapi-diffto exit with 0 if there are no breaking changes or with an error if there was breaking changes.What would be the proper command for that? @quen2404
jmini commentedon Apr 16, 2018
I would appreciate if you were using an other issue to ask a question, because this has nothing to do with this issue. I will be happy to discuss it with you and to help you.
itsjavi commentedon Apr 16, 2018
@jmini yeah sorry. I opened an issue for that.