Open kasbah opened 1 year ago
I found that adding --openapi-scopes=paths
gives me pydantic models. I'm not quite sure what that setting does actually. Would be really nice to get some hints from datamodel-codegen
that the paths or whatever it is might be the issue.
@kasbah
I'm sorry for my late response.
The code generator generates models from components.schemas
in OpenAPI as default.
But, the OpenAPI Spec has an empty schemas
object.
"components": {
"requestBodies": {},
"schemas": {},
In this case, you should add specific scopes like --openapi-scopes=paths
which has models spec.
Describe the bug Doesn't generate models for SpaceTraders OpenAPI spec.
To Reproduce
or
Expected behavior Generates models ;)
Version: