All Projects → APIDevTools → openapi-schemas

APIDevTools / openapi-schemas

Licence: MIT License
JSON Schemas for every version of the OpenAPI Specification

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to openapi-schemas

Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+3881.82%)
Mutual labels:  json-schema, swagger, openapi, openapi-specification, openapi3
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+3677.27%)
Mutual labels:  json-schema, swagger, openapi, openapi-specification, openapi3
Swurg
Parse OpenAPI documents into Burp Suite for automating OpenAPI-based APIs security assessments (approved by PortSwigger for inclusion in their official BApp Store).
Stars: ✭ 94 (+327.27%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+72331.82%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
openapi-schema-validator
OpenAPI schema validator for Python
Stars: ✭ 35 (+59.09%)
Mutual labels:  validation, swagger, openapi, openapi3
Swagger Parser
Swagger 2.0 and OpenAPI 3.0 parser/validator
Stars: ✭ 710 (+3127.27%)
Mutual labels:  validation, json-schema, swagger, openapi
Springdoc Openapi
Library for OpenAPI 3 with spring-boot
Stars: ✭ 1,113 (+4959.09%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Openapi Spec Validator
OpenAPI Spec validator
Stars: ✭ 161 (+631.82%)
Mutual labels:  validation, swagger, openapi, openapi3
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (+2027.27%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
openapi4j
OpenAPI 3 parser, JSON schema and request validator.
Stars: ✭ 92 (+318.18%)
Mutual labels:  json-schema, openapi, openapi-specification, openapi3
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+17036.36%)
Mutual labels:  validation, swagger, openapi, openapi3
Spot
Spot is a concise, developer-friendly way to describe your API contract.
Stars: ✭ 230 (+945.45%)
Mutual labels:  json-schema, swagger, openapi, openapi3
Swagger Core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Stars: ✭ 6,898 (+31254.55%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Openapi Spring Webflux Validator
🌱 A friendly kotlin library to validate API endpoints using an OpenApi 3.0 and Swagger 2.0 specification
Stars: ✭ 67 (+204.55%)
Mutual labels:  validation, swagger, openapi, openapi3
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+2245.45%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (+845.45%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Openapi.tools
A collection of Editors, Linters, Parsers, Code Generators, Documentation, Testing
Stars: ✭ 257 (+1068.18%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+96622.73%)
Mutual labels:  swagger, openapi, openapi-specification, openapi3
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+34604.55%)
Mutual labels:  json-schema, swagger, openapi, openapi3
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+179845.45%)
Mutual labels:  json-schema, swagger, openapi, openapi3

OpenAPI Specification Schemas

Cross-Platform Compatibility Build Status

Coverage Status Dependencies

npm License Buy us a tree

This package contains the official JSON Schemas for every version of Swagger/OpenAPI Specification:

Version Schema Docs
Swagger 1.2 v1.2 schema v1.2 docs
Swagger 2.0 v2.0 schema v2.0 docs
OpenAPI 3.0.x v3.0.x schema v3.0.3 docs
OpenAPI 3.1.x v3.1.x schema v3.1.0 docs

All schemas are kept up-to-date with the latest official definitions via an automated CI/CD job. 🤖📦

Installation

You can install OpenAPI Schemas via npm.

npm install @apidevtools/openapi-schemas

Usage

The default export contains all OpenAPI Specification versions:

const openapi = require("@apidevtools/openapi-schemas");

console.log(openapi.v1);    // { $schema, id, properties, definitions, ... }
console.log(openapi.v2);    // { $schema, id, properties, definitions, ... }
console.log(openapi.v3);    // { $schema, id, properties, definitions, ... }
console.log(openapi.v31);    // { $schema, id, properties, definitions, ... }

Or you can import the specific version(s) that you need:

const { openapiV1, openapiV2, openapiV3, openapiV31 } = require("@apidevtools/openapi-schemas");

console.log(openapiV1);    // { $schema, id, properties, definitions, ... }
console.log(openapiV2);    // { $schema, id, properties, definitions, ... }
console.log(openapiV3);    // { $schema, id, properties, definitions, ... }
console.log(openapiV31);    // { $schema, id, properties, definitions, ... }

You can use a JSON Schema validator such as Z-Schema or AJV to validate OpenAPI definitions against the specification.

const { openapiV31 } = require("@apidevtools/openapi-schemas");
const ZSchema = require("z-schema");

// Create a ZSchema validator
let validator = new ZSchema();

// Validate an OpenAPI definition against the OpenAPI v3.0 specification
validator.validate(openapiDefinition, openapiV31);

Contributing

Contributions, enhancements, and bug-fixes are welcome! Open an issue on GitHub and submit a pull request.

Building

To build the project locally on your computer:

  1. Clone this repo
    git clone https://github.com/APIDevTools/openapi-schemas.git

  2. Install dependencies
    npm install

  3. Build the code
    npm run build

  4. Run the tests
    npm test

License

OpenAPI Schemas is 100% free and open-source, under the MIT license. Use it however you want.

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

Big Thanks To

Thanks to these awesome companies for their support of Open Source developers

GitHub NPM Coveralls Travis CI SauceLabs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].