-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add custom attributes to changelog entries basing on OpenAPI extension tags #451
Comments
Hi @anikitin ,
Is this correct? Can we assume that the values are always strings or could they also be: null, other primitives (number, bool), an array or an object? |
(I just noticed that I haven't submitted my reply on this one, sorry about it) In our particular case x-tag values of interest can be of string or boolean type. Also they can be omitted for some operations (which may be treated as null, we don't indicate null values explicitly). At the same time I can see some value in supporting it for any primitive types. Would be more complex for arrays/objects and honestly such scenarios are unlikely and less straightforward. |
Another question: |
@reuvenharrison , good question. |
@reuvenharrison , do you want me to test with pull request first or are there any plans including it into official release? |
There is still some work to do before testing. |
|
In our OpenAPI specs we use a number of custom vendor extension tags which are set at the level of operation.
These are additional classifiers which help to group APIs one or another way.
Today oasdiff creates a changelog in JSON format and has "operation", "operationId" and "path" for each item.
My request is also support adding extra attributes basing on x-tags defined in original OpenAPI spec.
For example, I can have "x-audience: Public" defined in the spec at operation level.
Would be nice to have a config option which instructs oasdiff to copy certain xtags as attributes into resulting changelog JSON entry.
The rationale behind it is the following. We render changelog JSON as HTML table. So having extra columns which allows to quickly filter or sort basing on original classifiers from OpenAPI spec would help to analyze large changelogs.
Example:
OpenAPI fragment (YaML):
Changelog fragment:
Another helpful improvement would be detecting changes in these custom OpenAPI tags defined at operation level (simplest).
So in the example above, oasdiff could detect if "x-audience" is changed from "Private" to "Public".
The text was updated successfully, but these errors were encountered: