@seriousme/openapi-schema-validator
Advanced tools
Comparing version 2.1.5 to 2.1.6
@@ -6,2 +6,8 @@ # Changelog | ||
## [v2.1.6] 20-01-2024 | ||
### Changed | ||
- Updated dependencies | ||
- @biomejs/biome ^1.3.3 → ^1.5.2 | ||
- c8 ^9.0.0 → ^9.1.0 | ||
## [v2.1.5] 16-11-2023 | ||
@@ -8,0 +14,0 @@ ### Changed |
{ | ||
"name": "@seriousme/openapi-schema-validator", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Validate OpenApi specifications against their JSON schema", | ||
@@ -39,4 +39,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.3.3", | ||
"c8": "^8.0.1" | ||
"@biomejs/biome": "^1.5.2", | ||
"c8": "^9.1.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "directories": { |
@@ -5,3 +5,3 @@ # OpenAPI schema validator | ||
[](https://coveralls.io/github/seriousme/openapi-schema-validator?branch=master) | ||
[](https://www.npmjs.com/package/seriousme/openapi-schema-validator) | ||
[](https://www.npmjs.com/package/@seriousme/openapi-schema-validator) | ||
 | ||
@@ -8,0 +8,0 @@ [](https://apis.guru/browse-apis/) |
@@ -109,5 +109,3 @@ function escapeJsonPointer(str) { | ||
pointers[prop].push({ ref: obj[prop], obj, prop, path, id: objId }); | ||
if (replace) { | ||
delete obj[prop]; | ||
} | ||
delete obj[prop]; | ||
} | ||
@@ -114,0 +112,0 @@ parse(obj[prop], `${path}/${escapeJsonPointer(prop)}`, objId); |
{ | ||
"testDate": "2023-11-12T14:31:20.650Z", | ||
"testDate": "2023-11-16T16:33:43.171Z", | ||
"totalApiCount": 2529, | ||
"testedAPICount": 2529, | ||
"failedAPICount": 30, | ||
"knownFailedCount": 8, | ||
"failedAPICount": 32, | ||
"knownFailedCount": 30, | ||
"failedTests": [ | ||
@@ -160,3 +160,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.0" | ||
"specificationVersion": "3.0.0", | ||
"knownFailed": true | ||
}, | ||
@@ -177,3 +178,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.0" | ||
"specificationVersion": "3.0.0", | ||
"knownFailed": true | ||
}, | ||
@@ -194,3 +196,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -211,3 +214,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -228,3 +232,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -245,3 +250,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -262,3 +268,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -279,3 +286,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -296,3 +304,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -313,3 +322,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -330,3 +340,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -347,3 +358,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -364,3 +376,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -428,2 +441,18 @@ { | ||
{ | ||
"name": "azure.com:web-WebApps", | ||
"apiVersion": "2018-11-01", | ||
"openApiVersion": "2.0", | ||
"yamlUrl": "https://api.apis.guru/v2/specs/azure.com/web-WebApps/2018-11-01/swagger.yaml", | ||
"jsonUrl": "https://api.apis.guru/v2/specs/azure.com/web-WebApps/2018-11-01/swagger.json", | ||
"gitHubUrl": "https://github.com/APIs-guru/openapi-directory/blob/main/APIs/azure.com/web-WebApps/2018-11-01/swagger.yaml", | ||
"updated": "2020-01-07T12:09:22.000Z", | ||
"result": { | ||
"valid": false, | ||
"errors": "Cannot set properties of undefined (setting 'items')" | ||
}, | ||
"validatorVersion": "2.0", | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
}, | ||
{ | ||
"name": "box.com", | ||
@@ -442,5 +471,22 @@ "apiVersion": "2.0.0", | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.2" | ||
"specificationVersion": "3.0.2", | ||
"knownFailed": true | ||
}, | ||
{ | ||
"name": "clarify.io", | ||
"apiVersion": "1.3.7", | ||
"openApiVersion": "2.0", | ||
"yamlUrl": "https://api.apis.guru/v2/specs/clarify.io/1.3.7/swagger.yaml", | ||
"jsonUrl": "https://api.apis.guru/v2/specs/clarify.io/1.3.7/swagger.json", | ||
"gitHubUrl": "https://github.com/APIs-guru/openapi-directory/blob/main/APIs/clarify.io/1.3.7/swagger.yaml", | ||
"updated": "2019-01-03T07:01:34.000Z", | ||
"result": { | ||
"valid": false, | ||
"errors": "Cannot set properties of undefined (setting '_embedded')" | ||
}, | ||
"validatorVersion": "2.0", | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
}, | ||
{ | ||
"name": "cloud-elements.com:ecwid", | ||
@@ -459,3 +505,4 @@ "apiVersion": "api-v2", | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -630,3 +677,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.3" | ||
"specificationVersion": "3.0.3", | ||
"knownFailed": true | ||
}, | ||
@@ -647,3 +695,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.3" | ||
"specificationVersion": "3.0.3", | ||
"knownFailed": true | ||
}, | ||
@@ -664,3 +713,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.3" | ||
"specificationVersion": "3.0.3", | ||
"knownFailed": true | ||
}, | ||
@@ -681,3 +731,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.0" | ||
"specificationVersion": "3.0.0", | ||
"knownFailed": true | ||
}, | ||
@@ -698,3 +749,4 @@ { | ||
"specificationType": "swagger", | ||
"specificationVersion": "2.0" | ||
"specificationVersion": "2.0", | ||
"knownFailed": true | ||
}, | ||
@@ -1579,3 +1631,4 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.3" | ||
"specificationVersion": "3.0.3", | ||
"knownFailed": true | ||
}, | ||
@@ -1596,5 +1649,6 @@ { | ||
"specificationType": "openapi", | ||
"specificationVersion": "3.0.0" | ||
"specificationVersion": "3.0.0", | ||
"knownFailed": true | ||
} | ||
] | ||
} |
# Results of real world testing | ||
Report generated at: Sun Nov 12 2023 14:31:20 GMT+0000 (Coordinated Universal Time) | ||
Report generated at: Thu Nov 16 2023 16:33:43 GMT+0000 (Coordinated Universal Time) | ||
@@ -8,3 +8,3 @@ | APIs at [apis.guru](https://apis.guru) | # | ||
|Tested |2529 | ||
|Failed validation | 30 | ||
|Failed validation | 32 | ||
@@ -66,2 +66,3 @@ | ||
API updated: 2021-08-12T15:35:25.275Z | ||
Validation error: $id : '[object Object]' defined more than once at #/components/schemas/document/properties | ||
@@ -77,2 +78,3 @@ | ||
API updated: 2021-08-12T15:35:06.475Z | ||
Validation error: $id : '[object Object]' defined more than once at #/components/schemas/document/properties | ||
@@ -88,2 +90,3 @@ | ||
API updated: 2018-11-20T14:36:34.000Z | ||
Validation error: Can't resolve ./networkInterface.json#/definitions/NetworkInterface, only internal refs are supported. | ||
@@ -99,2 +102,3 @@ | ||
API updated: 2019-02-26T08:40:59.000Z | ||
Validation error: Can't resolve ./networkInterface.json#/definitions/NetworkInterfaceIPConfiguration, only internal refs are supported. | ||
@@ -110,2 +114,3 @@ | ||
API updated: 2018-03-10T09:23:51.000Z | ||
Validation error: Can't resolve ./applicationGateway.json#/definitions/ApplicationGatewayBackendAddressPool, only internal refs are supported. | ||
@@ -121,2 +126,3 @@ | ||
API updated: 2018-11-20T14:36:34.000Z | ||
Validation error: Can't resolve ./virtualNetwork.json#/definitions/Subnet, only internal refs are supported. | ||
@@ -132,2 +138,3 @@ | ||
API updated: 2018-11-20T14:36:34.000Z | ||
Validation error: Can't resolve ./networkInterface.json#/definitions/NetworkInterface, only internal refs are supported. | ||
@@ -143,2 +150,3 @@ | ||
API updated: 2019-07-25T10:27:32.000Z | ||
Validation error: Can't resolve ./networkInterface.json#/definitions/NetworkInterface, only internal refs are supported. | ||
@@ -154,2 +162,3 @@ | ||
API updated: 2018-03-10T09:23:51.000Z | ||
Validation error: Can't resolve ./networkInterface.json#/definitions/IPConfiguration, only internal refs are supported. | ||
@@ -165,2 +174,3 @@ | ||
API updated: 2018-03-10T09:23:51.000Z | ||
Validation error: Can't resolve ./virtualNetwork.json#/definitions/Subnet, only internal refs are supported. | ||
@@ -176,2 +186,3 @@ | ||
API updated: 2018-11-20T14:36:34.000Z | ||
Validation error: Can't resolve ./virtualNetwork.json#/definitions/Subnet, only internal refs are supported. | ||
@@ -187,2 +198,3 @@ | ||
API updated: 2018-11-20T14:36:34.000Z | ||
Validation error: Can't resolve ./networkProfile.json#/definitions/IPConfigurationProfile, only internal refs are supported. | ||
@@ -198,2 +210,3 @@ | ||
API updated: 2018-11-20T14:36:34.000Z | ||
Validation error: Can't resolve ./loadBalancer.json#/definitions/FrontendIPConfiguration, only internal refs are supported. | ||
@@ -250,2 +263,13 @@ | ||
## API: azure\.com:web-WebApps (version: 2018-11-01) | ||
swagger: [2.0](https://spec.openapis.org/oas/v2.0) | ||
[JSON Schema](https://github.com/seriousme/openapi-schema-validator/tree/master/schemas/v2.0/schema.json) | ||
API on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/azure.com/web-WebApps/2018-11-01/swagger.yaml) | ||
API updated: 2020-01-07T12:09:22.000Z | ||
Validation error: Cannot set properties of undefined (setting 'items') | ||
## API: box\.com (version: 2.0.0) | ||
@@ -258,5 +282,17 @@ openapi: [3.0.2](https://spec.openapis.org/oas/v3.0.2) | ||
API updated: 2023-03-06T07:12:59.965Z | ||
Validation error: $id : '01234500-12f1-1234-aa12-b1d234cb567e' defined more than once at #/components/schemas/File--Full/allOf/1/properties/metadata/allOf/0/example/enterprise_27335/marketingCollateral | ||
## API: clarify\.io (version: 1.3.7) | ||
swagger: [2.0](https://spec.openapis.org/oas/v2.0) | ||
[JSON Schema](https://github.com/seriousme/openapi-schema-validator/tree/master/schemas/v2.0/schema.json) | ||
API on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/clarify.io/1.3.7/swagger.yaml) | ||
API updated: 2019-01-03T07:01:34.000Z | ||
Validation error: Cannot set properties of undefined (setting '_embedded') | ||
## API: cloud-elements\.com:ecwid (version: api-v2) | ||
@@ -269,2 +305,3 @@ swagger: [2.0](https://spec.openapis.org/oas/v2.0) | ||
API updated: 2021-06-21T12:16:53.715Z | ||
Validation error: Can't resolve [object Object], only internal refs are supported. | ||
@@ -381,2 +418,3 @@ | ||
API updated: 2023-02-15T18:23:37.750Z | ||
Validation error: Can't resolve [object Object], only internal refs are supported. | ||
@@ -392,2 +430,3 @@ | ||
API updated: 2023-02-15T18:23:37.750Z | ||
Validation error: Can't resolve [object Object], only internal refs are supported. | ||
@@ -403,2 +442,3 @@ | ||
API updated: 2023-02-15T18:23:37.750Z | ||
Validation error: Can't resolve [object Object], only internal refs are supported. | ||
@@ -414,2 +454,3 @@ | ||
API updated: 2023-04-21T23:09:23.065Z | ||
Validation error: Can't resolve [object Object], only internal refs are supported. | ||
@@ -425,2 +466,3 @@ | ||
API updated: 2023-03-06T07:12:59.965Z | ||
Validation error: Can't resolve [object Object], only internal refs are supported. | ||
@@ -867,2 +909,3 @@ | ||
API updated: 2023-02-17T17:54:09.755Z | ||
Validation error: Can't resolve ../policies.yaml, only internal refs are supported. | ||
@@ -878,3 +921,4 @@ | ||
API updated: 2023-02-17T17:36:25.370Z | ||
Validation error: Can't resolve #/components/schemas/18_24 | ||
326541
9498