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 1.0.1 to 1.0.2

2

package.json
{
"name": "@seriousme/openapi-schema-validator",
"version": "1.0.1",
"version": "1.0.2",
"description": "Validate OpenApi specifications against their JSON schema",

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

@@ -25,12 +25,12 @@ # OpenAPI schema validator

```javascript
import Validator from "openapi-schema-validator";
import Validator from "@seriousme/openapi-schema-validator";
console.log(Validator.supportedVersions.has("3.1"))
console.log(Validator.supportedVersions.has("3.1"));
// prints true
const validator = new Validator();
const res = await validator.validate('./petstore.json');
if (res.valid){
const res = await validator.validate("./petstore.json");
if (res.valid) {
console.log("Specification matches schema for version", validator.version);
const schema = validator.resolveRefs());
const schema = validator.resolveRefs();
// schema now contains a Javascript object containing the dereferenced schema

@@ -37,0 +37,0 @@ } else {

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