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

Re-route schema references #2088

Open
mikethecalamity opened this issue Dec 3, 2024 · 2 comments
Open

Re-route schema references #2088

mikethecalamity opened this issue Dec 3, 2024 · 2 comments

Comments

@mikethecalamity
Copy link

The annotations on my REST resources define the schema references with URLs like this:

    @APIResponse(content = @Content(schema = @Schema(ref = "https://my.company.com/my-schema.json")))

But I need the OpenAPI processor to find the schema from the Java resources instead: resource://my-schema.json.

What's the best way to re-route the the schema refs to the resources using Smallrye OpenAPI 4. It would need to also handle the $ref properties inside the schemas themselves that have URLs. My guess was to utilize OASFilter? Unless there is a better way.

@MikeEdgar
Copy link
Member

Hi @mikethecalamity , is your goal to have the remote URLs references in the output but also include the contents of the schema JSON files in the main OpenAPI? Or do you want a single doc result without any references?

@mikethecalamity
Copy link
Author

Hi @MikeEdgar, I would like a single doc without references.

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

No branches or pull requests

2 participants