Skip to content

No public API to parse existing schema into OpenAPI model #2235

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

Open
matus-m opened this issue Apr 2, 2025 · 3 comments
Open

No public API to parse existing schema into OpenAPI model #2235

matus-m opened this issue Apr 2, 2025 · 3 comments

Comments

@matus-m
Copy link

matus-m commented Apr 2, 2025

With OpenAPIParser being deprecated (#1762) , there is currently no way to read/parse existing schema into OpenAPI model. Am I missing something or what would be the recommended approach to achieve this?

@MikeEdgar
Copy link
Member

Hi @matus-m , what is the use case for separately parsing a stand-alone schema? Do you have it in its own file and you want to add it to the OpenAPI from a filter, for example? There is a property that can be used to insert a schema to the components/schemas, so I'm trying to determine if that might help you.

@matus-m
Copy link
Author

matus-m commented Apr 2, 2025

Thanks for quick reply @MikeEdgar . One use case would be testing - asserting that the schema generated at runtime has all the attributes we expect (for example if there are a bunch of OASfilters that modify it dynamically). We used to do plain json deserialization into Smallrye model impl classes, but that approach no longer works (after the refactoring where they have been essentially hidden from app developers or marked as deprecated)

@MikeEdgar
Copy link
Member

Thanks for the information. We will be sure to not change the availability of OpenApiParser#parseSchema until there is a suitable replacement, and keep this issue open until then as well.

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