we generate datamodels from a folder structure
"--input-file-type",
"openapi",
"--input",
".",
"--output-model-type",
"pydantic_v2.BaseModel",
"--target-python-version",
"3.12",
"--use-field-description",
"--output",
"models".
the output looks like
tree models
models
βββ apis
βββ composition_basics
β βββ XAccountScaffold
β β βββ definition.yaml_openapi_v3
β β βββ co
β β β βββ acme
β β β βββ platform
β β β βββ __init__.py
β β β βββ v1alpha1.py
β β βββ io
β β βββ k8s
β β βββ apimachinery
β β βββ pkg
β β βββ apis
β β βββ __init__.py
β β βββ meta
β β βββ __init__.py
β β βββ v1.py
β βββ XCompositeCluster
β βββ definition.yaml_openapi_v3
β βββ co
β β βββ acme
β β βββ platform
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ io
β βββ k8s
β βββ apimachinery
β βββ pkg
β βββ apis
β βββ meta
β βββ __init__.py
β βββ v1.py
βββ primitives
β βββ XCluster
β β βββ definition.yaml_openapi_v3
β β βββ co
β β β βββ acme
β β β βββ platform
β β β βββ __init__.py
β β β βββ v1alpha1.py
β β βββ io
β β βββ k8s
β β βββ apimachinery
β β βββ pkg
β β βββ apis
β β βββ meta
β β βββ __init__.py
β β βββ v1.py
β βββ XDatabase
β β βββ definition.yaml_openapi_v3
β β βββ co
β β β βββ acme
β β β βββ platform
β β β βββ __init__.py
β β β βββ v1alpha1.py
β β βββ io
β β βββ k8s
β β βββ apimachinery
β β βββ pkg
β β βββ apis
β β βββ meta
β β βββ __init__.py
β β βββ v1.py
β βββ XNetwork
β β βββ definition.yaml_openapi_v3
β β βββ co
β β β βββ acme
β β β βββ platform
β β β βββ __init__.py
β β β βββ v1alpha1.py
β β βββ io
β β βββ k8s
β β βββ apimachinery
β β βββ pkg
β β βββ apis
β β βββ meta
β β βββ __init__.py
β β βββ v1.py
β βββ XNodepool
β β βββ definition.yaml_openapi_v3
β β βββ co
β β β βββ acme
β β β βββ platform
β β β βββ __init__.py
β β β βββ v1alpha1.py
β β βββ io
β β βββ k8s
β β βββ apimachinery
β β βββ pkg
β β βββ apis
β β βββ meta
β β βββ __init__.py
β β βββ v1.py
β βββ XServiceAccount
β β βββ definition.yaml_openapi_v3
β β βββ co
β β β βββ acme
β β β βββ platform
β β β βββ __init__.py
β β β βββ v1alpha1.py
β β βββ io
β β βββ k8s
β β βββ apimachinery
β β βββ pkg
β β βββ apis
β β βββ meta
β β βββ __init__.py
β β βββ v1.py
β βββ XSubnetwork
β βββ definition.yaml_openapi_v3
β βββ co
β β βββ acme
β β βββ platform
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ io
β βββ k8s
β βββ apimachinery
β βββ pkg
β βββ apis
β βββ meta
β βββ __init__.py
β βββ v1.py
wonder if we can get this to the following structure:
models
βββ co
β βββ acme
β βββ platform
β βββ accountscaffold
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ cluster
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ compositecluster
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ database
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ network
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ nodepool
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ serviceaccount
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ subnetwork
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xaccountscaffold
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xcluster
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xcompositecluster
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xdatabase
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xnetwork
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xnodepool
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xserviceaccount
β β βββ __init__.py
β β βββ v1alpha1.py
β βββ xsubnetwork
β βββ __init__.py
β βββ v1alpha1.py
βββ io
βββ crossplane
β βββ fn
β βββ pt
β βββ resources
β βββ __init__.py
β βββ v1beta1.py
βββ k8s
βββ apimachinery
βββ pkg
βββ apis
βββ meta
βββ __init__.py
βββ v1.py
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too