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 code automatically from Shipbob's published swagger specification #3

Open
lullis opened this issue Oct 7, 2022 · 1 comment

Comments

@lullis
Copy link

lullis commented Oct 7, 2022

Shipbob's Developer Site provides the OpenAPI specification from their API, which could be used to generate all the pydantic model types that we need by levaraging the datamodel-code-generator.

However, it seems that the published spec from them fails to work with the codegen tools. It would be nice to either fix the spec to make it work with the tools, or work with Shipbob upstream to get their spec fixed.

@antxln
Copy link

antxln commented Nov 4, 2022

The issue seems to be with codegen. After making this change, koxudaxi/datamodel-code-generator@df88011, I was able to generate the datamodels with

datamodel-codegen --input openapi.json --input-file-type openapi --output model

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