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

Generate models from OpenAPI v3 schema #57

Closed
wants to merge 4 commits into from
Closed

Generate models from OpenAPI v3 schema #57

wants to merge 4 commits into from

Conversation

pederhan
Copy link
Member

@pederhan pederhan commented Aug 1, 2023

This PR adds automatic conversion of the Harbor OpenAPI v2 schema to OpenAPI v3 by using the Swagger converter API:

https://converter.swagger.io/api/convert?url=OAS2_YAML_OR_JSON_URL

This lets us use newer versions of datamodel-code-generator, instead of being locked into version 0.13.0.

For now, we still generate Pydantic V1 models, but this is an important step in moving to Pydantic V2 in the near future.

Closes #54

@pederhan
Copy link
Member Author

pederhan commented Sep 7, 2023

This PR is being scrapped in favor of working on the pydantic-v2 branch. There is no point doing all this work , only to migrate to Pydantic V2 right after (thereby rendering a lot of this work obsolete). The new code generation code has been incorporated into the pydantic-v2 branch.

@pederhan pederhan closed this Sep 7, 2023
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

Successfully merging this pull request may close these issues.

Harbor API schema requires datamodel-code-generator<=0.13.0
1 participant