Skip to content
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

Non-breaking changes #258

Closed
souhailaS opened this issue May 24, 2023 · 7 comments
Closed

Non-breaking changes #258

souhailaS opened this issue May 24, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@souhailaS
Copy link

It would be nice to have an array of non breaking changes same as you do for breaking changes with the json format output.

@reuvenharrison reuvenharrison added the enhancement New feature or request label May 24, 2023
@reuvenharrison
Copy link
Collaborator

This is in progress as part of a new changelog feature.
You are welcome to join the discussion: #229

@anikitin
Copy link

@reuvenharrison , I tried "changelog" feature with version 2.1.2. But it seems that it still returns only breaking changes with default parameters. I can see much more changes mentioned in "diff" report than in "changelog" report. Am I missing something?

@reuvenharrison
Copy link
Collaborator

oasdiff changelog returns 3 levels of changes: ERR, WARN and INFO.
The INFO-level changes are the non-breaking ones.
There is on-going work by multiple contributors to reach full coverage so that the changelog will cover all changes.

For example:

(base) ➜  oasdiff git:(main) oasdiff changelog data/openapi-test1.yaml data/openapi-test3.yaml
16 changes: 2 error, 4 warning, 10 info
error	[response-success-status-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		removed the success response with the status '200'

error	[response-success-status-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		removed the success response with the status '201'

warning	[request-parameter-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		deleted the 'cookie' request parameter 'test'

warning	[request-parameter-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		deleted the 'header' request parameter 'user'

warning	[request-parameter-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		deleted the 'query' request parameter 'filter'

warning	[request-parameter-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/install-command
		deleted the 'header' request parameter 'network-policies'

info	[api-global-security-removed]
	in security
		the security scheme 'bearerAuth' was removed from the API

info	[api-schema-removed]
	in components
		removed the schema 'network-policies'

info	[api-schema-removed]
	in components
		removed the schema 'rules'

info	[api-security-component-removed]
	in components
		the component security scheme 'AccessToken' was removed

info	[api-security-component-removed]
	in components
		the component security scheme 'bearerAuth' was removed

info	[api-operation-id-removed] at data/openapi-test1.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		api operation id 'GetSecurityScores' removed and replaced with 'GetSecurityScore'

info	[api-tag-removed] at data/openapi-test1.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		api tag 'security' removed

info	[response-non-success-status-removed] at data/openapi-test3.yaml
	in API GET /api/{domain}/{project}/badges/security-score
		removed the non-success response with the status '400'

info	[api-security-removed] at data/openapi-test3.yaml
	in API POST /register
		the endpoint scheme security 'bearerAuth' was removed from the API

info	[api-security-scope-added] at data/openapi-test3.yaml
	in API POST /register
		the security scope 'write:pets' was added to the endpoint's security scheme 'OAuth'

@anikitin
Copy link

@reuvenharrison , thanks for update, so I am considering this feature as incomplete and looking forward for updates.
If you have any interest, I am building a simple HTML visualizer (based on JS Tabulator library) for changelog in JSON format.
Would be happy to share if you are interested.

image

@reuvenharrison
Copy link
Collaborator

I think your tool may be valuable to oasdiff users :-)
Please share a link and I will also add a reference to it in the readme.

@reuvenharrison
Copy link
Collaborator

oasdiff changelog currently supports 129 non-breaking checks.
You can see the full list by running oasdiff checks --severity info.
The community is invited to add more checks as needed.
I am closing this as completed.

@anikitin
Copy link

anikitin commented Dec 2, 2023

I think your tool may be valuable to oasdiff users :-) Please share a link and I will also add a reference to it in the readme.

@reuvenharrison , I owed you this one.

This is a ZIP archive with two files: HTML and JS. You can just open HTML locally in the browser to see how it looks like.
JS file is actually produced from JSON output of oasdiff changelog with some extra fields (I compose it using bash script from real oasdiff output and some variables indicating GitLab revisions).
The UI is based on fantastic Tabulator library (https://tabulator.info/).

Feel free to use in your projects if you find it useful.

oasdiff-changelog-ui.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants