swagger2openapi
Advanced tools
Comparing version 5.3.3 to 5.3.4
@@ -73,2 +73,3 @@ #!/usr/bin/env node | ||
.boolean('yaml') | ||
.default('yaml', true) | ||
.alias('y', 'yaml') | ||
@@ -120,3 +121,3 @@ .describe('yaml', 'skip YAML-safe test') | ||
for (let warning of options.warnings) { | ||
warnings.push(options.file + ' ' + warning); | ||
warnings.push(options.file + ' ' + warning.message); | ||
} | ||
@@ -170,8 +171,8 @@ } | ||
resultStr = yaml.stringify(result); // should be representable safely in yaml | ||
let resultStr2 = yaml.stringify(result); // FIXME dropped 'noRefs:true' here | ||
//let resultStr2 = yaml.stringify(result); // FIXME dropped 'noRefs:true' here | ||
should(resultStr).not.be.exactly('{}','Result should not be empty'); | ||
should(resultStr).equal(resultStr2,'Result should have no object identity ref_s'); | ||
//should(resultStr).equal(resultStr2,'Result should have no object identity ref_s'); | ||
} | ||
catch (ex) { | ||
if (options.verbose>1) { | ||
if (options.debug) { | ||
fs.writeFileSync('./debug.yaml',resultStr,'utf8'); | ||
@@ -223,4 +224,5 @@ console.warn('Result dumped to debug.yaml fixed.yaml'); | ||
let srcStr; | ||
if (!file.startsWith('http')) { | ||
let srcStr = fs.readFileSync(path.resolve(file), options.encoding); | ||
srcStr = fs.readFileSync(path.resolve(file), options.encoding); | ||
try { | ||
@@ -251,2 +253,3 @@ src = JSON.parse(srcStr); | ||
options.source = file; | ||
options.text = srcStr; | ||
options.expectFailure = false; | ||
@@ -266,3 +269,2 @@ options.allowFailure = false; | ||
if (file.startsWith('http')) { | ||
@@ -269,0 +271,0 @@ swagger2openapi.convertUrl(file, clone(options)) |
{ | ||
"name": "swagger2openapi", | ||
"version": "5.3.3", | ||
"version": "5.3.4", | ||
"description": "Convert Swagger 2.0 definitions to OpenApi 3.0 and validate", | ||
@@ -41,7 +41,7 @@ "main": "index.js", | ||
"oas-kit-common": "^1.0.7", | ||
"oas-resolver": "^2.2.7", | ||
"oas-schema-walker": "^1.1.2", | ||
"oas-validator": "^3.3.3", | ||
"reftools": "^1.0.10", | ||
"yaml": "^1.7.2", | ||
"oas-resolver": "^2.2.8", | ||
"oas-schema-walker": "^1.1.3", | ||
"oas-validator": "^3.3.4", | ||
"reftools": "^1.0.11", | ||
"yaml": "^1.8.0", | ||
"yargs": "^12.0.5" | ||
@@ -62,3 +62,3 @@ }, | ||
], | ||
"gitHead": "8ee9dc568594ae8a199c76aaa039b8e3aefbf5b7" | ||
"gitHead": "3c04d8c190507d806746d45042fcb8d579dfb237" | ||
} |
@@ -88,3 +88,3 @@ #!/usr/bin/env node | ||
if (options.yaml) { | ||
s = options.debug ? yaml.stringify(options.openapi) : yaml.stringify(options.openapi, {noRefs:true}); | ||
s = yaml.stringify(options.openapi); // removed noRefs here | ||
} | ||
@@ -113,2 +113,3 @@ else { | ||
argv.source = argv._[0]; | ||
argv.text = true; | ||
let u = url.parse(argv.source); | ||
@@ -115,0 +116,0 @@ if (u.protocol && u.protocol.startsWith('http')) { |
Sorry, the diff of this file is too big to display
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
102124
2120
Updatedoas-resolver@^2.2.8
Updatedoas-schema-walker@^1.1.3
Updatedoas-validator@^3.3.4
Updatedreftools@^1.0.11
Updatedyaml@^1.8.0