openapi-format
Advanced tools
Comparing version 1.13.0 to 1.13.1
## unreleased | ||
## [1.13.1] - 2023-02-25 | ||
- Prevent removal of empty objects in default examples (#72) | ||
- Update defaultSort.json, requestBody according to the spec (#69) | ||
- Bumped dependencies @stoplight/yaml, traverse | ||
- Build openapi-format as a Docker image | ||
## [1.13.0] - 2022-11-12 | ||
@@ -4,0 +11,0 @@ |
@@ -9,3 +9,3 @@ { | ||
"parameters": ["name", "in", "description", "required", "schema"], | ||
"requestBody": ["description", "headers", "content", "links"], | ||
"requestBody": ["description", "required", "content"], | ||
"responses": ["description", "headers", "content", "links"], | ||
@@ -12,0 +12,0 @@ "content": [], |
@@ -441,4 +441,8 @@ #!/usr/bin/env node | ||
// Remove empty objects | ||
if (node && Object.keys(node).length === 0 && node.constructor === Object && !['security', 'schemas'].includes(this.parent.key)) { | ||
debugFilterStep = 'Filter - Remove empty objects' | ||
if (node && Object.keys(node).length === 0 && node.constructor === Object | ||
&& !['security', 'schemas', 'default'].includes(this.parent.key) | ||
&& ((this.key === "examples" || this.key === "example") | ||
|| !this.path.includes('example') && !this.path.includes('examples')) | ||
) { | ||
// debugFilterStep = 'Filter - Remove empty objects' | ||
this.delete(); | ||
@@ -445,0 +449,0 @@ } |
{ | ||
"name": "openapi-format", | ||
"version": "1.13.0", | ||
"version": "1.13.1", | ||
"description": "Format an OpenAPI document by ordering, formatting and filtering fields.", | ||
@@ -55,6 +55,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@stoplight/yaml": "^4.2.2", | ||
"@stoplight/yaml": "^4.2.3", | ||
"case-anything": "^2.1.10", | ||
"commander": "^7.1.0", | ||
"traverse": "^0.6.6" | ||
"traverse": "^0.6.7" | ||
}, | ||
@@ -61,0 +61,0 @@ "devDependencies": { |
@@ -935,3 +935,3 @@  | ||
```shell | ||
$ openapi-format openapi.json -o openapi.json --convertTo "3.1" | ||
$ openapi-format openapi.json -o openapi-3.1.json --convertTo "3.1" | ||
``` | ||
@@ -938,0 +938,0 @@ |
117609
1547
Updated@stoplight/yaml@^4.2.3
Updatedtraverse@^0.6.7