Comparing version 0.0.17 to 0.0.18
{ | ||
"name": "crdtoapi", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "CustomResourceDefinitions to OpensAPI", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/yaacov/crdtoapi", |
@@ -360,7 +360,9 @@ #!/usr/bin/env node | ||
field.type = '{}'; | ||
} else if ('type' in field.additionalProperties) { | ||
} | ||
else if ('type' in field.additionalProperties) { | ||
field.originalType = field.type; | ||
field.type = `{[key: string]: ${field.additionalProperties.type}}`; | ||
} | ||
} else if (isObjectUndefined) { | ||
} | ||
else if (isObjectUndefined) { | ||
field.originalType = 'not defined'; | ||
@@ -367,0 +369,0 @@ field.type = options.fallbackType; |
@@ -26,2 +26,3 @@ #!/usr/bin/env node | ||
.option('--apiVersion <text>', 'Module API version') | ||
.option('--noApiVersionPrefix', 'Do not prefix types with API version') | ||
.option('-j, --json', 'output as json') | ||
@@ -88,3 +89,5 @@ .parse(process.argv); | ||
yaml.spec.versions.forEach((version) => { | ||
const name = `${version.name}${yaml.spec.names.kind}`; | ||
const name = !options.noApiVersionPrefix ? | ||
`${version.name}${yaml.spec.names.kind}` : | ||
`${yaml.spec.names.kind}`; | ||
@@ -91,0 +94,0 @@ schemas[name] = version.schema.openAPIV3Schema; |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
1
168365
22
984