JSON Schema files for Swagger/OpenAPI 2.0 specification. Current stable version is 2.0.0-bab6bed, which is the official JSON Schema for Swagger 2.0. This package provides the schema definition for validating Swagger 2.0 API documents. It is used by tools like Swagger UI and Swagger Editor. Note that it does not cover OpenAPI 3.x, which has its own schema packages. Release cadence is low, as it only updates when the Swagger specification changes.
npm install swagger-schema-officialNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Validates a Swagger 2.0 document using AJV with the official schema.
Use @apidevtools/swagger-parser or openapi-schema-validator for OpenAPI 3.x.
Pin to exact version in package.json to avoid unexpected updates.
Use npm or yarn for package management.
Add a declaration file: declare module 'swagger-schema-official' { const schema: object; export default schema; }Use asynchronous loading or tree-shaking if possible.
Run 'npm install swagger-schema-official'
Use 'require' or add 'assert { type: "json" }' with ESM imports.No dependency data recorded yet.