Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "crdtoapi", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "CustomResourceDefinitions to OpensAPI", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/yaacov/crdtoapi", |
@@ -5,3 +5,3 @@ # CustomResourceDefinitions to OpensAPI | ||
## Quick start | ||
## Usage | ||
@@ -13,2 +13,4 @@ Use kubernetes CRD definitions to create OpenAPI schema file. | ||
# add npm bin path to your PATH, or use full | ||
# excutable path, e.g. $(npm bin)/crdtoapi | ||
crdtoapi --help | ||
@@ -19,2 +21,20 @@ | ||
## Generate some API | ||
``` bash | ||
# create an OpenAPI file | ||
crdtoapi -i ./examples/forklift/ \ | ||
-o openapi.yaml \ | ||
-t "Forklift API" \ | ||
-d "Forklift migration toolkit API definitions." \ | ||
-l "Apache-2.0" \ | ||
--apiVersion "2.4.0" \ | ||
--contactEmail kubev2v-dev@redhat.com | ||
# use openapi-generator-cli: | ||
# npm i -g @openapitools/openapi-generator-cli | ||
openapi-generator-cli generate -g typescript-fetch --skip-validate-spec -o generated -i openapi.yaml | ||
``` | ||
## Build | ||
@@ -25,2 +45,3 @@ | ||
``` bash | ||
npm install | ||
npm run lint:fix | ||
@@ -27,0 +48,0 @@ npm run build |
@@ -13,3 +13,3 @@ #!/usr/bin/env node | ||
program | ||
.version("0.0.5") | ||
.version("0.0.6") | ||
.description("Convert CRDs to OpenAPI file") | ||
@@ -123,3 +123,3 @@ .option("-i, --in <dir>", "Input directory path [Required]") | ||
const out = { | ||
openapi: "3.0.0", | ||
openapi: "3.1.0", | ||
info: { | ||
@@ -126,0 +126,0 @@ description: options.description, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140095
46