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

Can't extract models from openapi via paths and references #2207

Open
Wim-De-Clercq opened this issue Dec 5, 2024 · 0 comments
Open

Can't extract models from openapi via paths and references #2207

Wim-De-Clercq opened this issue Dec 5, 2024 · 0 comments

Comments

@Wim-De-Clercq
Copy link

Wim-De-Clercq commented Dec 5, 2024

Describe the bug
When trying to extract models from openapi, where the main openapi schema itself does not contain traditional components/schemas it does not seem to behave correctly.
No models are found, or otherwise references don't get resolved properly.

To Reproduce

Example schema:
Please see the data in this commit Wim-De-Clercq/testingrepo@1c0c8e4

It has a little test as well, although nothing is truly asserted.

Expected behavior
I expect the schemas within ./cat/schemas.yaml to be turned into models.

Version:

  • OS: Kubuntu 24.04
  • Python version: 3.11
  • datamodel-code-generator version: main branch.

Additional context
The test in my commit keeps on complaining about Models not found in the input data.

I actually come from a larger project and tried to reproduce it in a small test.
In my large project - with in my eyes a similar setup - I however end up with file not found errors. So I'm pretty sure the ref resolving has problems as well with this kind of setup. Somewhere beyond this test. But at the moment I keep on getting stuck on this error to try reproducing it further.

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

1 participant