@loopback/openapi-spec
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

DEPRECATION NOTICE

This package has been deprecated in favor of OpenAPI Spec version 3.0.0, we are no longer maintaining it.

@loopback/openapi-spec

TypeScript type definitions for OpenAPI Spec/Swagger documents.

Overview

TypeScript definitions describing the schema of OpenAPI/Swagger documents, including LoopBack-specific extensions.

Installation

$ npm install --save @loopback/openapi-spec

Basic use

Use OpenApiSpec type in your function accepting a Swagger/OpenAPI document:

import {OpenApiSpec} from '@loopback/openapi-spec';

export function validateSpec(spec: OpenApiSpec) {
  // ...
}

IDEs like Visual Studio Code will offer auto-completion for spec properties when constructing a spec argument value.

Related resources

See https://www.openapis.org/ and version 2.0 of OpenAPI Specification.

Contributions

IBM/StrongLoop is an active supporter of open source and welcomes contributions to our projects as well as those of the Node.js community in general. For more information on how to contribute please refer to the Contribution Guide.

Tests

run npm test from the root folder.

Contributors

See all contributors.

License

MIT

Package Sidebar

Install

npm i @loopback/openapi-spec

Weekly Downloads

646

Version

0.3.0

License

MIT

Unpacked Size

649 kB

Total Files

64

Last publish

Collaborators

  • rfeng
  • bajtos
  • rmg
  • hacksparrow
  • dhmlau
  • jerry-apic
  • theprez