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

1.2.1 • Public • Published

@loopback/openapi-v3-types

TypeScript type definitions for OpenAPI Spec/Swagger documents.

Overview

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

This package is deprecated, use openapi3-ts or @loopback/openapi-v3 instead.

Installation

npm install --save @loopback/openapi-v3-types

Basic use

Use OpenApiSpec type in your function accepting an OpenAPI document:

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

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 3.0.0 of OpenAPI Specification. For the types missing in this package, they are exported from https://www.npmjs.com/package/openapi3-ts

Contributions

Tests

Run npm test from the root folder.

Contributors

See all contributors.

License

MIT

Package Sidebar

Install

npm i @loopback/openapi-v3-types

Weekly Downloads

3,126

Version

1.2.1

License

MIT

Unpacked Size

25.2 kB

Total Files

14

Last publish

Collaborators

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