openapi3-ts
- Version 4.4.0
- Published
- 171 kB
- 1 dependency
- MIT license
Install
npm i openapi3-ts
yarn add openapi3-ts
pnpm add openapi3-ts
Overview
TS Model & utils for OpenAPI 3.x specification.
Index
Classes
Namespaces
oas30
- addExtension()
- BaseParameterObject
- CallbackObject
- CallbacksObject
- ComponentsObject
- ContactObject
- ContentObject
- DiscriminatorObject
- EncodingObject
- EncodingPropertyObject
- ExampleObject
- ExamplesObject
- ExternalDocumentationObject
- getExtension()
- getPath()
- HeaderObject
- HeadersObject
- IExtensionName
- IExtensionType
- InfoObject
- ISpecificationExtension
- isReferenceObject()
- isSchemaObject()
- LicenseObject
- LinkObject
- LinkParametersObject
- LinksObject
- MediaTypeObject
- OAuthFlowObject
- OAuthFlowsObject
- OpenApiBuilder
- OpenAPIObject
- OperationObject
- ParameterLocation
- ParameterObject
- ParameterStyle
- PathItemObject
- PathObject
- PathsObject
- ReferenceObject
- RequestBodyObject
- ResponseObject
- ResponsesObject
- SchemaObject
- SchemaObjectFormat
- SchemaObjectType
- SchemasObject
- ScopesObject
- SecurityRequirementObject
- SecuritySchemeObject
- SecuritySchemeType
- Server
- ServerObject
- ServerVariable
- ServerVariableObject
- SpecificationExtension
- TagObject
- XmlObject
oas31
- addExtension()
- BaseParameterObject
- CallbackObject
- CallbacksObject
- ComponentsObject
- ContactObject
- ContentObject
- DiscriminatorObject
- EncodingObject
- EncodingPropertyObject
- ExampleObject
- ExamplesObject
- ExternalDocumentationObject
- getExtension()
- getPath()
- HeaderObject
- HeadersObject
- IExtensionName
- IExtensionType
- InfoObject
- ISpecificationExtension
- isReferenceObject()
- isSchemaObject()
- LicenseObject
- LinkObject
- LinkParametersObject
- LinksObject
- MediaTypeObject
- OAuthFlowObject
- OAuthFlowsObject
- OpenApiBuilder
- OpenAPIObject
- OperationObject
- ParameterLocation
- ParameterObject
- ParameterStyle
- PathItemObject
- PathObject
- PathsObject
- ReferenceObject
- RequestBodyObject
- ResponseObject
- ResponsesObject
- SchemaObject
- SchemaObjectType
- SchemasObject
- ScopesObject
- SecurityRequirementObject
- SecuritySchemeObject
- SecuritySchemeType
- Server
- ServerObject
- ServerVariable
- ServerVariableObject
- SpecificationExtension
- TagObject
- XmlObject
Classes
class Server
class Server implements ServerObject {}
constructor
constructor(url: string, desc?: string);
property description
description?: string;
property url
url: string;
property variables
variables: { [v: string]: ServerVariable };
method addVariable
addVariable: (name: string, variable: ServerVariable) => void;
class ServerVariable
class ServerVariable implements ServerVariableObject {}
constructor
constructor( defaultValue: string | number | boolean, enums?: string[] | boolean[] | number[], description?: string);
property default
default: string | number | boolean;
property description
description?: string;
property enum
enum?: string[] | boolean[] | number[];
Namespaces
namespace oas30
module 'dist/oas30.d.ts' {}
function addExtension
addExtension: ( obj: ISpecificationExtension | undefined, extensionName: string, extension: any) => void;
function getExtension
getExtension: ( obj: ISpecificationExtension | undefined, extensionName: string) => any;
function getPath
getPath: (pathsObject: PathsObject, path: string) => PathItemObject | undefined;
function isReferenceObject
isReferenceObject: (obj: any) => obj is ReferenceObject;
function isSchemaObject
isSchemaObject: ( schema: SchemaObject | ReferenceObject) => schema is SchemaObject;
class OpenApiBuilder
class OpenApiBuilder {}
constructor
constructor(doc?: oa.OpenAPIObject);
property rootDoc
rootDoc: oa.OpenAPIObject;
method addCallback
addCallback: ( name: string, callback: oa.CallbackObject | oa.ReferenceObject) => OpenApiBuilder;
method addContact
addContact: (contact: oa.ContactObject) => OpenApiBuilder;
method addDescription
addDescription: (description: string) => OpenApiBuilder;
method addExample
addExample: ( name: string, example: oa.ExampleObject | oa.ReferenceObject) => OpenApiBuilder;
method addExternalDocs
addExternalDocs: (extDoc: oa.ExternalDocumentationObject) => OpenApiBuilder;
method addHeader
addHeader: ( name: string, header: oa.HeaderObject | oa.ReferenceObject) => OpenApiBuilder;
method addInfo
addInfo: (info: oa.InfoObject) => OpenApiBuilder;
method addLicense
addLicense: (license: oa.LicenseObject) => OpenApiBuilder;
method addLink
addLink: ( name: string, link: oa.LinkObject | oa.ReferenceObject) => OpenApiBuilder;
method addOpenApiVersion
addOpenApiVersion: (openApiVersion: string) => OpenApiBuilder;
method addParameter
addParameter: ( name: string, parameter: oa.ParameterObject | oa.ReferenceObject) => OpenApiBuilder;
method addPath
addPath: (path: string, pathItem: oa.PathItemObject) => OpenApiBuilder;
method addRequestBody
addRequestBody: ( name: string, reqBody: oa.RequestBodyObject | oa.ReferenceObject) => OpenApiBuilder;
method addResponse
addResponse: ( name: string, response: oa.ResponseObject | oa.ReferenceObject) => OpenApiBuilder;
method addSchema
addSchema: ( name: string, schema: oa.SchemaObject | oa.ReferenceObject) => OpenApiBuilder;
method addSecurityScheme
addSecurityScheme: ( name: string, secScheme: oa.SecuritySchemeObject | oa.ReferenceObject) => OpenApiBuilder;
method addServer
addServer: (server: oa.ServerObject) => OpenApiBuilder;
method addTag
addTag: (tag: oa.TagObject) => OpenApiBuilder;
method addTermsOfService
addTermsOfService: (termsOfService: string) => OpenApiBuilder;
method addTitle
addTitle: (title: string) => OpenApiBuilder;
method addVersion
addVersion: (version: string) => OpenApiBuilder;
method create
static create: (doc?: oa.OpenAPIObject) => OpenApiBuilder;
method getSpec
getSpec: () => oa.OpenAPIObject;
method getSpecAsJson
getSpecAsJson: ( replacer?: (key: string, value: unknown) => unknown, space?: string | number) => string;
method getSpecAsYaml
getSpecAsYaml: ( replacer?: Parameters<typeof yaml.stringify>[1], options?: Parameters<typeof yaml.stringify>[2]) => string;
class Server
class Server implements ServerObject {}
constructor
constructor(url: string, desc?: string);
property description
description?: string;
property url
url: string;
property variables
variables: { [v: string]: ServerVariable };
method addVariable
addVariable: (name: string, variable: ServerVariable) => void;
class ServerVariable
class ServerVariable implements ServerVariableObject {}
constructor
constructor( defaultValue: string | number | boolean, enums?: string[] | boolean[] | number[], description?: string);
property default
default: string | number | boolean;
property description
description?: string;
property enum
enum?: string[] | boolean[] | number[];
class SpecificationExtension
class SpecificationExtension implements ISpecificationExtension {}
method addExtension
addExtension: (extensionName: string, payload: any) => void;
method getExtension
getExtension: (extensionName: string) => any;
method isValidExtension
static isValidExtension: (extensionName: string) => boolean;
method listExtensions
listExtensions: () => string[];
interface BaseParameterObject
interface BaseParameterObject extends ISpecificationExtension {}
property allowEmptyValue
allowEmptyValue?: boolean;
property allowReserved
allowReserved?: boolean;
property content
content?: ContentObject;
property deprecated
deprecated?: boolean;
property description
description?: string;
property example
example?: any;
property examples
examples?: { [param: string]: ExampleObject | ReferenceObject;};
property explode
explode?: boolean;
property required
required?: boolean;
property schema
schema?: SchemaObject | ReferenceObject;
property style
style?: ParameterStyle;
interface CallbackObject
interface CallbackObject extends ISpecificationExtension {}
index signature
[name: string]: PathItemObject | any;
interface CallbacksObject
interface CallbacksObject extends ISpecificationExtension {}
index signature
[name: string]: CallbackObject | ReferenceObject | any;
interface ComponentsObject
interface ComponentsObject extends ISpecificationExtension {}
property callbacks
callbacks?: { [callback: string]: CallbackObject | ReferenceObject;};
property examples
examples?: { [example: string]: ExampleObject | ReferenceObject;};
property headers
headers?: { [header: string]: HeaderObject | ReferenceObject;};
property links
links?: { [link: string]: LinkObject | ReferenceObject;};
property parameters
parameters?: { [parameter: string]: ParameterObject | ReferenceObject;};
property requestBodies
requestBodies?: { [request: string]: RequestBodyObject | ReferenceObject;};
property responses
responses?: { [response: string]: ResponseObject | ReferenceObject;};
property schemas
schemas?: { [schema: string]: SchemaObject | ReferenceObject;};
property securitySchemes
securitySchemes?: { [securityScheme: string]: SecuritySchemeObject | ReferenceObject;};
interface ContactObject
interface ContactObject extends ISpecificationExtension {}
interface ContentObject
interface ContentObject {}
index signature
[mediatype: string]: MediaTypeObject;
interface DiscriminatorObject
interface DiscriminatorObject {}
property mapping
mapping?: { [key: string]: string;};
property propertyName
propertyName: string;
interface EncodingObject
interface EncodingObject extends ISpecificationExtension {}
index signature
[property: string]: EncodingPropertyObject | any;
interface EncodingPropertyObject
interface EncodingPropertyObject {}
property allowReserved
allowReserved?: boolean;
property contentType
contentType?: string;
property explode
explode?: boolean;
property headers
headers?: { [key: string]: HeaderObject | ReferenceObject;};
property style
style?: string;
index signature
[key: string]: any;
interface ExampleObject
interface ExampleObject {}
property description
description?: string;
property externalValue
externalValue?: string;
property summary
summary?: string;
property value
value?: any;
index signature
[property: string]: any;
interface ExamplesObject
interface ExamplesObject {}
index signature
[name: string]: ExampleObject | ReferenceObject;
interface ExternalDocumentationObject
interface ExternalDocumentationObject extends ISpecificationExtension {}
property description
description?: string;
property url
url: string;
interface HeaderObject
interface HeaderObject extends BaseParameterObject {}
property $ref
$ref?: string;
interface HeadersObject
interface HeadersObject {}
index signature
[name: string]: HeaderObject | ReferenceObject;
interface InfoObject
interface InfoObject extends ISpecificationExtension {}
property contact
contact?: ContactObject;
property description
description?: string;
property license
license?: LicenseObject;
property termsOfService
termsOfService?: string;
property title
title: string;
property version
version: string;
interface LicenseObject
interface LicenseObject extends ISpecificationExtension {}
interface LinkObject
interface LinkObject extends ISpecificationExtension {}
property description
description?: string;
property operationId
operationId?: string;
property operationRef
operationRef?: string;
property parameters
parameters?: LinkParametersObject;
property requestBody
requestBody?: any | string;
property server
server?: ServerObject;
index signature
[property: string]: any;
interface LinkParametersObject
interface LinkParametersObject {}
index signature
[name: string]: any | string;
interface LinksObject
interface LinksObject {}
index signature
[name: string]: LinkObject | ReferenceObject;
interface MediaTypeObject
interface MediaTypeObject extends ISpecificationExtension {}
interface OAuthFlowObject
interface OAuthFlowObject extends ISpecificationExtension {}
property authorizationUrl
authorizationUrl?: string;
property refreshUrl
refreshUrl?: string;
property scopes
scopes: ScopesObject;
property tokenUrl
tokenUrl?: string;
interface OAuthFlowsObject
interface OAuthFlowsObject extends ISpecificationExtension {}
property authorizationCode
authorizationCode?: OAuthFlowObject;
property clientCredentials
clientCredentials?: OAuthFlowObject;
property implicit
implicit?: OAuthFlowObject;
property password
password?: OAuthFlowObject;
interface OpenAPIObject
interface OpenAPIObject extends ISpecificationExtension {}
property components
components?: ComponentsObject;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property info
info: InfoObject;
property openapi
openapi: string;
property paths
paths: PathsObject;
property security
security?: SecurityRequirementObject[];
property servers
servers?: ServerObject[];
property tags
tags?: TagObject[];
interface OperationObject
interface OperationObject extends ISpecificationExtension {}
property callbacks
callbacks?: CallbacksObject;
property deprecated
deprecated?: boolean;
property description
description?: string;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property operationId
operationId?: string;
property parameters
parameters?: (ParameterObject | ReferenceObject)[];
property requestBody
requestBody?: RequestBodyObject | ReferenceObject;
property responses
responses: ResponsesObject;
property security
security?: SecurityRequirementObject[];
property servers
servers?: ServerObject[];
property summary
summary?: string;
property tags
tags?: string[];
interface ParameterObject
interface ParameterObject extends BaseParameterObject {}
interface PathItemObject
interface PathItemObject extends ISpecificationExtension {}
property $ref
$ref?: string;
property delete
delete?: OperationObject;
property description
description?: string;
property get
get?: OperationObject;
property head
head?: OperationObject;
property options
options?: OperationObject;
property parameters
parameters?: (ParameterObject | ReferenceObject)[];
property patch
patch?: OperationObject;
property post
post?: OperationObject;
property put
put?: OperationObject;
property servers
servers?: ServerObject[];
property summary
summary?: string;
property trace
trace?: OperationObject;
interface PathsObject
interface PathsObject extends ISpecificationExtension {}
index signature
[path: string]: PathItemObject;
interface ReferenceObject
interface ReferenceObject {}
property $ref
$ref: string;
interface RequestBodyObject
interface RequestBodyObject extends ISpecificationExtension {}
property content
content: ContentObject;
property description
description?: string;
property required
required?: boolean;
interface ResponseObject
interface ResponseObject extends ISpecificationExtension {}
property content
content?: ContentObject;
property description
description: string;
property headers
headers?: HeadersObject;
property links
links?: LinksObject;
interface ResponsesObject
interface ResponsesObject extends ISpecificationExtension {}
property default
default?: ResponseObject | ReferenceObject;
index signature
[statuscode: string]: ResponseObject | ReferenceObject | any;
interface SchemaObject
interface SchemaObject extends ISpecificationExtension {}
property additionalProperties
additionalProperties?: SchemaObject | ReferenceObject | boolean;
property allOf
allOf?: (SchemaObject | ReferenceObject)[];
property anyOf
anyOf?: (SchemaObject | ReferenceObject)[];
property default
default?: any;
property deprecated
deprecated?: boolean;
property description
description?: string;
property discriminator
discriminator?: DiscriminatorObject;
property enum
enum?: any[];
property example
example?: any;
property examples
examples?: any[];
property exclusiveMaximum
exclusiveMaximum?: boolean;
property exclusiveMinimum
exclusiveMinimum?: boolean;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property format
format?: SchemaObjectFormat;
property items
items?: SchemaObject | ReferenceObject;
property maximum
maximum?: number;
property maxItems
maxItems?: number;
property maxLength
maxLength?: number;
property maxProperties
maxProperties?: number;
property minimum
minimum?: number;
property minItems
minItems?: number;
property minLength
minLength?: number;
property minProperties
minProperties?: number;
property multipleOf
multipleOf?: number;
property not
not?: SchemaObject | ReferenceObject;
property nullable
nullable?: boolean;
property oneOf
oneOf?: (SchemaObject | ReferenceObject)[];
property pattern
pattern?: string;
property properties
properties?: { [propertyName: string]: SchemaObject | ReferenceObject;};
property readOnly
readOnly?: boolean;
property required
required?: string[];
property title
title?: string;
property type
type?: SchemaObjectType | SchemaObjectType[];
property uniqueItems
uniqueItems?: boolean;
property writeOnly
writeOnly?: boolean;
property xml
xml?: XmlObject;
interface SchemasObject
interface SchemasObject {}
index signature
[schema: string]: SchemaObject;
interface ScopesObject
interface ScopesObject extends ISpecificationExtension {}
index signature
[scope: string]: any;
interface SecurityRequirementObject
interface SecurityRequirementObject {}
index signature
[name: string]: string[];
interface SecuritySchemeObject
interface SecuritySchemeObject extends ISpecificationExtension {}
property bearerFormat
bearerFormat?: string;
property description
description?: string;
property flows
flows?: OAuthFlowsObject;
property in
in?: string;
property name
name?: string;
property openIdConnectUrl
openIdConnectUrl?: string;
property scheme
scheme?: string;
property type
type: SecuritySchemeType;
interface ServerObject
interface ServerObject extends ISpecificationExtension {}
property description
description?: string;
property url
url: string;
property variables
variables?: { [v: string]: ServerVariableObject;};
interface ServerVariableObject
interface ServerVariableObject extends ISpecificationExtension {}
property default
default: string | boolean | number;
property description
description?: string;
property enum
enum?: string[] | boolean[] | number[];
interface TagObject
interface TagObject extends ISpecificationExtension {}
property description
description?: string;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property name
name: string;
index signature
[extension: string]: any;
interface XmlObject
interface XmlObject extends ISpecificationExtension {}
type IExtensionName
type IExtensionName = `x-${string}`;
type IExtensionType
type IExtensionType = any;
type ISpecificationExtension
type ISpecificationExtension = { [extensionName: IExtensionName]: IExtensionType;};
type ParameterLocation
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
type ParameterStyle
type ParameterStyle = | 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
type PathObject
type PathObject = PathsObject;
type SchemaObjectFormat
type SchemaObjectFormat = | 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password' | string;
type SchemaObjectType
type SchemaObjectType = | 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
type SecuritySchemeType
type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
namespace oas31
module 'dist/oas31.d.ts' {}
function addExtension
addExtension: ( obj: ISpecificationExtension | undefined, extensionName: string, extension: any) => void;
function getExtension
getExtension: ( obj: ISpecificationExtension | undefined, extensionName: string) => any;
function getPath
getPath: ( pathsObject: PathsObject | undefined, path: string) => PathItemObject | undefined;
function isReferenceObject
isReferenceObject: (obj: any) => obj is ReferenceObject;
function isSchemaObject
isSchemaObject: ( schema: SchemaObject | ReferenceObject) => schema is SchemaObject;
class OpenApiBuilder
class OpenApiBuilder {}
constructor
constructor(doc?: oa.OpenAPIObject);
property rootDoc
rootDoc: oa.OpenAPIObject;
method addCallback
addCallback: ( name: string, callback: oa.CallbackObject | oa.ReferenceObject) => OpenApiBuilder;
method addContact
addContact: (contact: oa.ContactObject) => OpenApiBuilder;
method addDescription
addDescription: (description: string) => OpenApiBuilder;
method addExample
addExample: ( name: string, example: oa.ExampleObject | oa.ReferenceObject) => OpenApiBuilder;
method addExternalDocs
addExternalDocs: (extDoc: oa.ExternalDocumentationObject) => OpenApiBuilder;
method addHeader
addHeader: ( name: string, header: oa.HeaderObject | oa.ReferenceObject) => OpenApiBuilder;
method addInfo
addInfo: (info: oa.InfoObject) => OpenApiBuilder;
method addLicense
addLicense: (license: oa.LicenseObject) => OpenApiBuilder;
method addLink
addLink: ( name: string, link: oa.LinkObject | oa.ReferenceObject) => OpenApiBuilder;
method addOpenApiVersion
addOpenApiVersion: (openApiVersion: string) => OpenApiBuilder;
method addParameter
addParameter: ( name: string, parameter: oa.ParameterObject | oa.ReferenceObject) => OpenApiBuilder;
method addPath
addPath: (path: string, pathItem: oa.PathItemObject) => OpenApiBuilder;
method addRequestBody
addRequestBody: ( name: string, reqBody: oa.RequestBodyObject | oa.ReferenceObject) => OpenApiBuilder;
method addResponse
addResponse: ( name: string, response: oa.ResponseObject | oa.ReferenceObject) => OpenApiBuilder;
method addSchema
addSchema: ( name: string, schema: oa.SchemaObject | oa.ReferenceObject) => OpenApiBuilder;
method addSecurityScheme
addSecurityScheme: ( name: string, secScheme: oa.SecuritySchemeObject | oa.ReferenceObject) => OpenApiBuilder;
method addServer
addServer: (server: oa.ServerObject) => OpenApiBuilder;
method addTag
addTag: (tag: oa.TagObject) => OpenApiBuilder;
method addTermsOfService
addTermsOfService: (termsOfService: string) => OpenApiBuilder;
method addTitle
addTitle: (title: string) => OpenApiBuilder;
method addVersion
addVersion: (version: string) => OpenApiBuilder;
method addWebhook
addWebhook: (webhook: string, webhookItem: oa.PathItemObject) => OpenApiBuilder;
method create
static create: (doc?: oa.OpenAPIObject) => OpenApiBuilder;
method getSpec
getSpec: () => oa.OpenAPIObject;
method getSpecAsJson
getSpecAsJson: ( replacer?: (key: string, value: unknown) => unknown, space?: string | number) => string;
method getSpecAsYaml
getSpecAsYaml: ( replacer?: Parameters<typeof yaml.stringify>[1], options?: Parameters<typeof yaml.stringify>[2]) => string;
class Server
class Server implements ServerObject {}
constructor
constructor(url: string, desc?: string);
property description
description?: string;
property url
url: string;
property variables
variables: { [v: string]: ServerVariable };
method addVariable
addVariable: (name: string, variable: ServerVariable) => void;
class ServerVariable
class ServerVariable implements ServerVariableObject {}
constructor
constructor( defaultValue: string | number | boolean, enums?: string[] | boolean[] | number[], description?: string);
property default
default: string | number | boolean;
property description
description?: string;
property enum
enum?: string[] | boolean[] | number[];
class SpecificationExtension
class SpecificationExtension implements ISpecificationExtension {}
method addExtension
addExtension: (extensionName: string, payload: any) => void;
method getExtension
getExtension: (extensionName: string) => any;
method isValidExtension
static isValidExtension: (extensionName: string) => boolean;
method listExtensions
listExtensions: () => string[];
interface BaseParameterObject
interface BaseParameterObject extends ISpecificationExtension {}
property allowEmptyValue
allowEmptyValue?: boolean;
property allowReserved
allowReserved?: boolean;
property content
content?: ContentObject;
property deprecated
deprecated?: boolean;
property description
description?: string;
property example
example?: any;
property examples
examples?: { [param: string]: ExampleObject | ReferenceObject;};
property explode
explode?: boolean;
property required
required?: boolean;
property schema
schema?: SchemaObject | ReferenceObject;
property style
style?: ParameterStyle;
interface CallbackObject
interface CallbackObject extends ISpecificationExtension {}
index signature
[name: string]: PathItemObject | any;
interface CallbacksObject
interface CallbacksObject extends ISpecificationExtension {}
index signature
[name: string]: CallbackObject | ReferenceObject | any;
interface ComponentsObject
interface ComponentsObject extends ISpecificationExtension {}
property callbacks
callbacks?: { [callback: string]: CallbackObject | ReferenceObject;};
property examples
examples?: { [example: string]: ExampleObject | ReferenceObject;};
property headers
headers?: { [header: string]: HeaderObject | ReferenceObject;};
property links
links?: { [link: string]: LinkObject | ReferenceObject;};
property parameters
parameters?: { [parameter: string]: ParameterObject | ReferenceObject;};
property requestBodies
requestBodies?: { [request: string]: RequestBodyObject | ReferenceObject;};
property responses
responses?: { [response: string]: ResponseObject | ReferenceObject;};
property schemas
schemas?: { [schema: string]: SchemaObject | ReferenceObject;};
property securitySchemes
securitySchemes?: { [securityScheme: string]: SecuritySchemeObject | ReferenceObject;};
interface ContactObject
interface ContactObject extends ISpecificationExtension {}
interface ContentObject
interface ContentObject {}
index signature
[mediatype: string]: MediaTypeObject;
interface DiscriminatorObject
interface DiscriminatorObject {}
property mapping
mapping?: { [key: string]: string;};
property propertyName
propertyName: string;
interface EncodingObject
interface EncodingObject extends ISpecificationExtension {}
index signature
[property: string]: EncodingPropertyObject | any;
interface EncodingPropertyObject
interface EncodingPropertyObject {}
property allowReserved
allowReserved?: boolean;
property contentType
contentType?: string;
property explode
explode?: boolean;
property headers
headers?: { [key: string]: HeaderObject | ReferenceObject;};
property style
style?: string;
index signature
[key: string]: any;
interface ExampleObject
interface ExampleObject {}
property description
description?: string;
property externalValue
externalValue?: string;
property summary
summary?: string;
property value
value?: any;
index signature
[property: string]: any;
interface ExamplesObject
interface ExamplesObject {}
index signature
[name: string]: ExampleObject | ReferenceObject;
interface ExternalDocumentationObject
interface ExternalDocumentationObject extends ISpecificationExtension {}
property description
description?: string;
property url
url: string;
interface HeaderObject
interface HeaderObject extends BaseParameterObject {}
property $ref
$ref?: string;
interface HeadersObject
interface HeadersObject {}
index signature
[name: string]: HeaderObject | ReferenceObject;
interface InfoObject
interface InfoObject extends ISpecificationExtension {}
property contact
contact?: ContactObject;
property description
description?: string;
property license
license?: LicenseObject;
property termsOfService
termsOfService?: string;
property title
title: string;
property version
version: string;
interface LicenseObject
interface LicenseObject extends ISpecificationExtension {}
interface LinkObject
interface LinkObject extends ISpecificationExtension {}
property description
description?: string;
property operationId
operationId?: string;
property operationRef
operationRef?: string;
property parameters
parameters?: LinkParametersObject;
property requestBody
requestBody?: any | string;
property server
server?: ServerObject;
index signature
[property: string]: any;
interface LinkParametersObject
interface LinkParametersObject {}
index signature
[name: string]: any | string;
interface LinksObject
interface LinksObject {}
index signature
[name: string]: LinkObject | ReferenceObject;
interface MediaTypeObject
interface MediaTypeObject extends ISpecificationExtension {}
interface OAuthFlowObject
interface OAuthFlowObject extends ISpecificationExtension {}
property authorizationUrl
authorizationUrl?: string;
property refreshUrl
refreshUrl?: string;
property scopes
scopes: ScopesObject;
property tokenUrl
tokenUrl?: string;
interface OAuthFlowsObject
interface OAuthFlowsObject extends ISpecificationExtension {}
property authorizationCode
authorizationCode?: OAuthFlowObject;
property clientCredentials
clientCredentials?: OAuthFlowObject;
property implicit
implicit?: OAuthFlowObject;
property password
password?: OAuthFlowObject;
interface OpenAPIObject
interface OpenAPIObject extends ISpecificationExtension {}
property components
components?: ComponentsObject;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property info
info: InfoObject;
property openapi
openapi: string;
property paths
paths?: PathsObject;
property security
security?: SecurityRequirementObject[];
property servers
servers?: ServerObject[];
property tags
tags?: TagObject[];
property webhooks
webhooks?: PathsObject;
interface OperationObject
interface OperationObject extends ISpecificationExtension {}
property callbacks
callbacks?: CallbacksObject;
property deprecated
deprecated?: boolean;
property description
description?: string;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property operationId
operationId?: string;
property parameters
parameters?: (ParameterObject | ReferenceObject)[];
property requestBody
requestBody?: RequestBodyObject | ReferenceObject;
property responses
responses?: ResponsesObject;
property security
security?: SecurityRequirementObject[];
property servers
servers?: ServerObject[];
property summary
summary?: string;
property tags
tags?: string[];
interface ParameterObject
interface ParameterObject extends BaseParameterObject {}
interface PathItemObject
interface PathItemObject extends ISpecificationExtension {}
property $ref
$ref?: string;
property delete
delete?: OperationObject;
property description
description?: string;
property get
get?: OperationObject;
property head
head?: OperationObject;
property options
options?: OperationObject;
property parameters
parameters?: (ParameterObject | ReferenceObject)[];
property patch
patch?: OperationObject;
property post
post?: OperationObject;
property put
put?: OperationObject;
property servers
servers?: ServerObject[];
property summary
summary?: string;
property trace
trace?: OperationObject;
interface PathsObject
interface PathsObject extends ISpecificationExtension {}
index signature
[path: string]: PathItemObject;
interface ReferenceObject
interface ReferenceObject {}
property $ref
$ref: string;
property description
description?: string;
property summary
summary?: string;
interface RequestBodyObject
interface RequestBodyObject extends ISpecificationExtension {}
property content
content: ContentObject;
property description
description?: string;
property required
required?: boolean;
interface ResponseObject
interface ResponseObject extends ISpecificationExtension {}
property content
content?: ContentObject;
property description
description: string;
property headers
headers?: HeadersObject;
property links
links?: LinksObject;
interface ResponsesObject
interface ResponsesObject extends ISpecificationExtension {}
property default
default?: ResponseObject | ReferenceObject;
index signature
[statuscode: string]: ResponseObject | ReferenceObject | any;
interface SchemaObject
interface SchemaObject extends ISpecificationExtension {}
property additionalProperties
additionalProperties?: SchemaObject | ReferenceObject | boolean;
property allOf
allOf?: (SchemaObject | ReferenceObject)[];
property anyOf
anyOf?: (SchemaObject | ReferenceObject)[];
property const
const?: any;
property contentEncoding
contentEncoding?: string;
property contentMediaType
contentMediaType?: string;
property default
default?: any;
property deprecated
deprecated?: boolean;
property description
description?: string;
property discriminator
discriminator?: DiscriminatorObject;
property enum
enum?: any[];
property example
example?: any;
property examples
examples?: any[];
property exclusiveMaximum
exclusiveMaximum?: number;
property exclusiveMinimum
exclusiveMinimum?: number;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property format
format?: | 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password' | string;
property items
items?: SchemaObject | ReferenceObject;
property maximum
maximum?: number;
property maxItems
maxItems?: number;
property maxLength
maxLength?: number;
property maxProperties
maxProperties?: number;
property minimum
minimum?: number;
property minItems
minItems?: number;
property minLength
minLength?: number;
property minProperties
minProperties?: number;
property multipleOf
multipleOf?: number;
property not
not?: SchemaObject | ReferenceObject;
property oneOf
oneOf?: (SchemaObject | ReferenceObject)[];
property pattern
pattern?: string;
property prefixItems
prefixItems?: (SchemaObject | ReferenceObject)[];
property properties
properties?: { [propertyName: string]: SchemaObject | ReferenceObject;};
property propertyNames
propertyNames?: SchemaObject | ReferenceObject;
property readOnly
readOnly?: boolean;
property required
required?: string[];
property title
title?: string;
property type
type?: SchemaObjectType | SchemaObjectType[];
property uniqueItems
uniqueItems?: boolean;
property writeOnly
writeOnly?: boolean;
property xml
xml?: XmlObject;
interface SchemasObject
interface SchemasObject {}
index signature
[schema: string]: SchemaObject;
interface ScopesObject
interface ScopesObject extends ISpecificationExtension {}
index signature
[scope: string]: any;
interface SecurityRequirementObject
interface SecurityRequirementObject {}
index signature
[name: string]: string[];
interface SecuritySchemeObject
interface SecuritySchemeObject extends ISpecificationExtension {}
property bearerFormat
bearerFormat?: string;
property description
description?: string;
property flows
flows?: OAuthFlowsObject;
property in
in?: string;
property name
name?: string;
property openIdConnectUrl
openIdConnectUrl?: string;
property scheme
scheme?: string;
property type
type: SecuritySchemeType;
interface ServerObject
interface ServerObject extends ISpecificationExtension {}
property description
description?: string;
property url
url: string;
property variables
variables?: { [v: string]: ServerVariableObject;};
interface ServerVariableObject
interface ServerVariableObject extends ISpecificationExtension {}
property default
default: string | boolean | number;
property description
description?: string;
property enum
enum?: string[] | boolean[] | number[];
interface TagObject
interface TagObject extends ISpecificationExtension {}
property description
description?: string;
property externalDocs
externalDocs?: ExternalDocumentationObject;
property name
name: string;
index signature
[extension: string]: any;
interface XmlObject
interface XmlObject extends ISpecificationExtension {}
type IExtensionName
type IExtensionName = `x-${string}`;
type IExtensionType
type IExtensionType = any;
type ISpecificationExtension
type ISpecificationExtension = { [extensionName: IExtensionName]: IExtensionType;};
type ParameterLocation
type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
type ParameterStyle
type ParameterStyle = | 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
type PathObject
type PathObject = PathsObject;
type SchemaObjectType
type SchemaObjectType = | 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
type SecuritySchemeType
type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
Package Files (10)
Dependencies (1)
Dev Dependencies (16)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/openapi3-ts
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/openapi3-ts)
- HTML<a href="https://www.jsdocs.io/package/openapi3-ts"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 7704 ms. - Missing or incorrect documentation? Open an issue for this package.