Skip to content

Repository files navigation

OpenAPI 3.1 Types

npm versionnpm downloadscodecovLicense: MITGitHub last commitGitHub issuesGitHub stars

TypeScript types for the OpenAPI Specification.

Installation

You can install this package via npm:

npm install -D @omer-x/openapi-types

or via yarn:

yarn add -D @omer-x/openapi-types

Usage

Import the types you need in your TypeScript project:

import{OpenApiDocument}from'@omer-x/openapi-types';// Example usageconstopenApiSpec: OpenApiDocument={openapi: "3.1.0",info: {title: "Sample API",version: "1.0.0"},paths: {}};

You can also import specific types directly:

importtype{ComponentsObject}from"@omer-x/openapi-types/components";importtype{ExampleObject}from"@omer-x/openapi-types/example";importtype{InfoObject}from"@omer-x/openapi-types/info";importtype{LinkObject}from"@omer-x/openapi-types/link";importtype{MediaTypeObject}from"@omer-x/openapi-types/media-type";importtype{OperationObject}from"@omer-x/openapi-types/operation";importtype{ParameterObject}from"@omer-x/openapi-types/parameter";importtype{PathItemObject,PathsObject}from"@omer-x/openapi-types/paths";importtype{ReferenceObject}from"@omer-x/openapi-types/reference";importtype{RequestBodyObject}from"@omer-x/openapi-types/request-body";importtype{ResponseObject,ResponsesObject}from"@omer-x/openapi-types/response";importtype{SchemaObject}from"@omer-x/openapi-types/schema";importtype{TagObject}from"@omer-x/openapi-types/tag";

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

TypeScript types for the OpenAPI Specification

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages