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

OpenAPI schema out of date #2161

Closed
zregvart opened this issue Oct 22, 2024 · 2 comments
Closed

OpenAPI schema out of date #2161

zregvart opened this issue Oct 22, 2024 · 2 comments

Comments

@zregvart
Copy link

Description of Problem / Feature Request

I've noticed that the current published OpenAPI document is out of date. The SourcePackage's property source is declared as string, whereas in the claircore it is Package via recursive declaration of Package.

When I try to validate the Clair clair formatted report produced by clair-action with the JSON Schema generated using https://github.com/grantila/typeconv/, e.g. npx typeconv -f oapi -t jsc openapi.yaml, I get a schema violation like:

packages.02FzDBS76jWKACvjeaEWyg==.source.source: Invalid type. Expected: string, given: object

Expected Outcome

The OpenAPI schema should reflect the report generated from Clair.

Actual Outcome

See the description above

Environment

Using clair-action 0.0.10.

@crozzy
Copy link
Collaborator

crozzy commented Nov 13, 2024

I think the correct way to go is something like this where the Package refers to itself, this was an issue for a long time in the swagger UI but appears to have be fixed: swagger-api/swagger-ui#3325

@crozzy
Copy link
Collaborator

crozzy commented Nov 27, 2024

This is merged into main, @zregvart feel free to reopen if issues remain

@crozzy crozzy closed this as completed Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants