-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
This tool, and libopenapi
respectively, cannot (to my knowledge) handle a very common case, which is:
- define an OpenAPI schema with external references (pointing to local files relative to the schema file)
- push that schema
- remove any of the $ref'ed schemas from the repo and push the new changes
- do any changes afterwards that do not bring back this $ref file from the past
Whenever openapi-changes
checks the git history and compares file changes there will always be this error:
https://github.com/pb33f/libopenapi/blob/1f17c502e78acf5984a49a3459fcc37ce316c0c8/index/find_component.go#L161
I tried --ext-refs
and -p
with different path combinations, no success.
I'd contribute to the project, but Go is not my lang of expertise and I also read @daveshanley is rewriting it.
Here is a sample project that perfectly demonstrates the issue in its simplest form:
openapi-changes-ref-bug.zip
- unzip the folder
- cd into it
- execute
openapi-changes html-report . openapi.yaml
- also try `openapi-changes html-report --ext-refs -p . . openapi.yaml
Metadata
Metadata
Assignees
Labels
No labels