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

@apidevtools/openapi-schemas

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apidevtools/openapi-schemas

JSON Schemas for every version of the OpenAPI Specification

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
decreased by-41.08%
Maintainers
3
Weekly downloads
 
Created

What is @apidevtools/openapi-schemas?

The @apidevtools/openapi-schemas package provides JSON Schema definitions for OpenAPI Specification (OAS) documents. This allows developers to validate their OpenAPI documents against the official OpenAPI schemas, ensuring they adhere to the correct format and standards set by the OpenAPI Initiative.

What are @apidevtools/openapi-schemas's main functionalities?

Validation of OpenAPI documents

This code sample demonstrates how to use the @apidevtools/openapi-schemas package to validate an OpenAPI 3.0 document using the AJV library, which is a popular JSON schema validator.

const Ajv = require('ajv');
const openApiSchema = require('@apidevtools/openapi-schemas');
const ajv = new Ajv();
const validate = ajv.compile(openApiSchema.v3_0);
const openApiDoc = {
  openapi: '3.0.0',
  info: {
    title: 'Sample API',
    version: '1.0'
  },
  paths: {}
};
const valid = validate(openApiDoc);
if (!valid) console.log(validate.errors);

Other packages similar to @apidevtools/openapi-schemas

Keywords

FAQs

Package last updated on 01 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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