yaacov / crdtoapi

Use kubernetes CRD definitions to create OpenAPI schema file
Apache License 2.0
3 stars 1 forks source link

support the ability to exclude the version prefix from the generated types #6

Closed rotty3000 closed 3 months ago

rotty3000 commented 3 months ago

Because we prefer to put the version in the path which we can do simply by outputting the types to a sub-directory:

CRD_GV="group/v1"
npx crdtotypes --metadataType V1ObjectMeta -i ${OPENAPI_DIR}/openapi.yaml -o ${TYPESCRIPT_OUT_DIR}/${CRD_GV}

I'm thinking of a flag --noApiVersionPrefix so that the current behavior remains and allowing to opt-in to this new one.

PR forthcoming.

yaacov commented 3 months ago

https://www.npmjs.com/package/crdtoapi/v/0.0.18 :tada:

yaacov commented 3 months ago

https://www.npmjs.com/package/crdtoapi/v/0.0.19 :cake:

rotty3000 commented 3 months ago

thank you @yaacov! :)