Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@seriousme/openapi-schema-validator

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seriousme/openapi-schema-validator - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

CHANGELOG.md

@@ -6,2 +6,6 @@ # Changelog

## [v2.0.2] 12-05-2022
### Changed
- Fix file handling on Windows
## [v2.0.1] 26-04-2022

@@ -8,0 +12,0 @@ ### Changed

3

index.js

@@ -0,1 +1,2 @@

import { fileURLToPath, URL } from "url";
import Ajv04 from "ajv-draft-04";

@@ -17,3 +18,3 @@ import Ajv2020 from "ajv/dist/2020.js";

function localFile(fileName) {
return new URL(fileName, import.meta.url).pathname;
return fileURLToPath(new URL(fileName, import.meta.url));
}

@@ -20,0 +21,0 @@

{
"name": "@seriousme/openapi-schema-validator",
"version": "2.0.1",
"version": "2.0.2",
"description": "Validate OpenApi specifications against their JSON schema",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -37,3 +37,3 @@ function escapeMarkDown(string){

for (const key in data) {
item = data[key];
const item = data[key];
output += `

@@ -40,0 +40,0 @@ ### Path: ${escapeMarkDown(item.path)}

# Results of real world testing
Report generated at: Thu Apr 21 2022 16:53:05 GMT+0000 (Coordinated Universal Time)
Report generated at: Thu May 12 2022 16:55:01 GMT+0000 (Coordinated Universal Time)
| APIs at [apis.guru](https://apis.guru) | #
|--------|-------|
|Total |2348
|Tested |2348
|Failed validation | 47
|Total |2351
|Tested |2351
|Failed validation | 49

@@ -344,3 +344,3 @@

API updated: 2022-04-19T23:09:47.721Z
API updated: 2022-05-03T23:10:03.961Z

@@ -366,3 +366,3 @@ ### Path:

API updated: 2022-03-24T23:10:34.757Z
API updated: 2022-04-22T23:10:23.790Z

@@ -403,12 +403,12 @@ ### Path:

## API: googleapis\.com:cloudfunctions (version: v2alpha)
## API: googleapis\.com:cloudfunctions (version: v2)
OpenApi: [3.0.0](https://spec.openapis.org/oas/v3.0.0)
[JSON Schema](https://github.com/seriousme/openapi-schema-validator/tree/master/schemas/v3.0/schema.json)
API on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/cloudfunctions/v2alpha/openapi.yaml)
API on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/cloudfunctions/v2/openapi.yaml)
API updated: 2022-04-20T23:11:35.775Z
API updated: 2022-05-11T23:10:48.393Z
### Path:
Path on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/cloudfunctions/v2alpha/openapi.yaml#L1)
Path on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/cloudfunctions/v2/openapi.yaml#L1)

@@ -452,3 +452,3 @@ Value: content too large

API updated: 2022-04-14T23:10:30.529Z
API updated: 2022-05-11T23:10:48.393Z

@@ -573,2 +573,23 @@ ### Path:

## API: googleapis\.com:firebaseappcheck (version: v1)
OpenApi: [3.0.0](https://spec.openapis.org/oas/v3.0.0)
[JSON Schema](https://github.com/seriousme/openapi-schema-validator/tree/master/schemas/v3.0/schema.json)
API on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/firebaseappcheck/v1/openapi.yaml)
API updated: 2022-04-29T23:10:53.381Z
### Path:
Path on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/firebaseappcheck/v1/openapi.yaml#L1)
Value: content too large
AJV errors:
|Keyword |Params |Message |
|--------|-------|--------|
|additionalProperties |{"additionalProperty":"source"}| must NOT have additional properties
## API: googleapis\.com:firebasehosting (version: v1beta1)

@@ -664,3 +685,3 @@ OpenApi: [3.0.0](https://spec.openapis.org/oas/v3.0.0)

API updated: 2022-04-13T23:10:19.708Z
API updated: 2022-05-11T23:10:48.393Z

@@ -686,3 +707,3 @@ ### Path:

API updated: 2022-04-20T23:11:35.775Z
API updated: 2022-04-27T23:10:40.341Z

@@ -729,3 +750,3 @@ ### Path:

API updated: 2022-02-28T23:12:00.794Z
API updated: 2022-04-28T23:10:59.329Z

@@ -751,3 +772,3 @@ ### Path:

API updated: 2022-04-20T23:11:35.775Z
API updated: 2022-04-21T23:10:20.600Z

@@ -773,3 +794,3 @@ ### Path:

API updated: 2022-04-04T23:11:37.475Z
API updated: 2022-05-02T23:10:55.054Z

@@ -795,3 +816,3 @@ ### Path:

API updated: 2022-04-18T23:08:38.452Z
API updated: 2022-05-11T23:10:48.393Z

@@ -817,3 +838,3 @@ ### Path:

API updated: 2022-04-04T23:11:37.475Z
API updated: 2022-05-11T23:10:48.393Z

@@ -839,3 +860,3 @@ ### Path:

API updated: 2022-04-15T23:10:59.877Z
API updated: 2022-05-06T23:10:24.423Z

@@ -861,3 +882,3 @@ ### Path:

API updated: 2022-04-19T23:09:47.721Z
API updated: 2022-05-09T23:10:34.733Z

@@ -919,2 +940,23 @@ ### Path:

## API: googleapis\.com:verifiedaccess (version: v2)
OpenApi: [3.0.0](https://spec.openapis.org/oas/v3.0.0)
[JSON Schema](https://github.com/seriousme/openapi-schema-validator/tree/master/schemas/v3.0/schema.json)
API on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/verifiedaccess/v2/openapi.yaml)
API updated: 2022-04-29T23:10:53.381Z
### Path:
Path on Github: [link](https://github.com/APIs-guru/openapi-directory/blob/main/APIs/googleapis.com/verifiedaccess/v2/openapi.yaml#L1)
Value: content too large
AJV errors:
|Keyword |Params |Message |
|--------|-------|--------|
|additionalProperties |{"additionalProperty":"source"}| must NOT have additional properties
## API: googleapis\.com:vision (version: v1p2beta1)

@@ -921,0 +963,0 @@ OpenApi: [3.0.0](https://spec.openapis.org/oas/v3.0.0)

@@ -0,1 +1,2 @@

import { fileURLToPath, URL } from "url";
import { test } from "tap";

@@ -6,3 +7,3 @@ import { execSync } from "child_process"

function localFile(fileName) {
return new URL(fileName, import.meta.url).pathname;
return fileURLToPath(new URL(fileName, import.meta.url));
}

@@ -19,13 +20,13 @@

test("cli fails on empty spec", (t) => {
test("cli fails on empty spec", (t) => {
t.plan(1);
const cli = localFile("../bin/validate-api-cli.js");
const yamlFileName = localFile(`./validation/empty.json`);
t.throws(()=> execSync(`node ${cli} ${yamlFileName}`));
t.throws(() => execSync(`node ${cli} ${yamlFileName}`));
});
test("cli fails on no spec", (t) => {
test("cli fails on no spec", (t) => {
t.plan(1);
const cli = localFile("../bin/validate-api-cli.js");
t.throws(()=> execSync(`node ${cli}`));
t.throws(() => execSync(`node ${cli}`));
});

@@ -0,1 +1,2 @@

import { fileURLToPath, URL } from "url";
import { test } from "tap";

@@ -7,3 +8,3 @@ import { Validator } from "../index.js";

function localFile(fileName) {
return new URL(fileName, import.meta.url).pathname;
return fileURLToPath(new URL(fileName, import.meta.url));
}

@@ -10,0 +11,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc