| declare namespace SwaggerIo { |
| namespace V2 { |
| interface SchemaJson { |
| swagger: '2.0'; |
| info: SchemaJson.Definitions.Info; |
| host?: string; |
| basePath?: string; |
| schemes?: SchemaJson.Definitions.SchemesList; |
| consumes?: SchemaJson.Definitions.MimeType[]; |
| produces?: SchemaJson.Definitions.MimeType[]; |
| paths: SchemaJson.Definitions.Paths; |
| definitions?: SchemaJson.Definitions.Definitions; |
| parameters?: SchemaJson.Definitions.ParameterDefinitions; |
| responses?: SchemaJson.Definitions.ResponseDefinitions; |
| security?: SchemaJson.Definitions.Security; |
| securityDefinitions?: SchemaJson.Definitions.SecurityDefinitions; |
| tags?: SchemaJson.Definitions.Tag[]; |
| externalDocs?: SchemaJson.Definitions.ExternalDocs; |
| } |
| namespace SchemaJson { |
| namespace Definitions { |
| interface ApiKeySecurity { |
| type: 'apiKey'; |
| name: string; |
| in: 'header' | 'query'; |
| description?: string; |
| } |
| interface BasicAuthenticationSecurity { |
| type: 'basic'; |
| description?: string; |
| } |
| interface BodyParameter { |
| description?: string; |
| name: string; |
| in: 'body'; |
| required?: boolean; |
| schema: JsonSchemaOrg.Draft04.Schema; |
| } |
| type CollectionFormat = 'csv' | 'ssv' | 'tsv' | 'pipes'; |
| type CollectionFormatWithMulti = 'csv' | 'ssv' | 'tsv' | 'pipes' | 'multi'; |
| interface Contact { |
| name?: string; |
| url?: string; |
| email?: string; |
| } |
| type Default = JsonSchemaOrg.Draft04.Schema.Properties.Default; |
| interface Definitions { |
| [name: string]: JsonSchemaOrg.Draft04.Schema; |
| } |
| type Enum = JsonSchemaOrg.Draft04.Schema.Properties.Enum; |
| interface Examples { |
| [name: string]: any; |
| } |
| type ExclusiveMaximum = JsonSchemaOrg.Draft04.Schema.Properties.ExclusiveMaximum; |
| type ExclusiveMinimum = JsonSchemaOrg.Draft04.Schema.Properties.ExclusiveMinimum; |
| interface ExternalDocs { |
| description?: string; |
| url: string; |
| } |
| interface FileSchema { |
| format?: string; |
| title?: JsonSchemaOrg.Draft04.Schema.Properties.Title; |
| description?: JsonSchemaOrg.Draft04.Schema.Properties.Description; |
| default?: JsonSchemaOrg.Draft04.Schema.Properties.Default; |
| required?: JsonSchemaOrg.Draft04.Schema.Definitions.StringArray; |
| type: 'file'; |
| readOnly?: boolean; |
| externalDocs?: ExternalDocs; |
| example?: any; |
| } |
| interface FormDataParameterSubSchema { |
| required?: boolean; |
| in?: 'formData'; |
| description?: string; |
| name?: string; |
| allowEmptyValue?: boolean; |
| type?: 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'file'; |
| format?: string; |
| items?: PrimitivesItems; |
| collectionFormat?: CollectionFormatWithMulti; |
| default?: Default; |
| maximum?: Maximum; |
| exclusiveMaximum?: ExclusiveMaximum; |
| minimum?: Minimum; |
| exclusiveMinimum?: ExclusiveMinimum; |
| maxLength?: MaxLength; |
| minLength?: MinLength; |
| pattern?: Pattern; |
| maxItems?: MaxItems; |
| minItems?: MinItems; |
| uniqueItems?: UniqueItems; |
| enum?: Enum; |
| multipleOf?: MultipleOf; |
| } |
| interface Header { |
| type: 'string' | 'number' | 'integer' | 'boolean' | 'array'; |
| format?: string; |
| items?: PrimitivesItems; |
| collectionFormat?: CollectionFormat; |
| default?: Default; |
| maximum?: Maximum; |
| exclusiveMaximum?: ExclusiveMaximum; |
| minimum?: Minimum; |
| exclusiveMinimum?: ExclusiveMinimum; |
| maxLength?: MaxLength; |
| minLength?: MinLength; |
| pattern?: Pattern; |
| maxItems?: MaxItems; |
| minItems?: MinItems; |
| uniqueItems?: UniqueItems; |
| enum?: Enum; |
| multipleOf?: MultipleOf; |
| description?: string; |
| } |
| interface HeaderParameterSubSchema { |
| required?: boolean; |
| in?: 'header'; |
| description?: string; |
| name?: string; |
| type?: 'string' | 'number' | 'boolean' | 'integer' | 'array'; |
| format?: string; |
| items?: PrimitivesItems; |
| collectionFormat?: CollectionFormat; |
| default?: Default; |
| maximum?: Maximum; |
| exclusiveMaximum?: ExclusiveMaximum; |
| minimum?: Minimum; |
| exclusiveMinimum?: ExclusiveMinimum; |
| maxLength?: MaxLength; |
| minLength?: MinLength; |
| pattern?: Pattern; |
| maxItems?: MaxItems; |
| minItems?: MinItems; |
| uniqueItems?: UniqueItems; |
| enum?: Enum; |
| multipleOf?: MultipleOf; |
| } |
| interface Headers { |
| [name: string]: Header; |
| } |
| interface Info { |
| title: string; |
| version: string; |
| description?: string; |
| termsOfService?: string; |
| contact?: Contact; |
| license?: License; |
| } |
| interface JsonReference { |
| $ref: string; |
| } |
| interface License { |
| name: string; |
| url?: string; |
| } |
| type MaxItems = JsonSchemaOrg.Draft04.Schema.Definitions.PositiveInteger; |
| type MaxLength = JsonSchemaOrg.Draft04.Schema.Definitions.PositiveInteger; |
| type Maximum = JsonSchemaOrg.Draft04.Schema.Properties.Maximum; |
| type MediaTypeList = MimeType[]; |
| type MimeType = string; |
| type MinItems = JsonSchemaOrg.Draft04.Schema.Definitions.PositiveIntegerDefault0; |
| type MinLength = JsonSchemaOrg.Draft04.Schema.Definitions.PositiveIntegerDefault0; |
| type Minimum = JsonSchemaOrg.Draft04.Schema.Properties.Minimum; |
| type MultipleOf = JsonSchemaOrg.Draft04.Schema.Properties.MultipleOf; |
| interface NonBodyParameter { |
| } |
| interface Oauth2AccessCodeSecurity { |
| type: 'oauth2'; |
| flow: 'accessCode'; |
| scopes?: Oauth2Scopes; |
| authorizationUrl: string; |
| tokenUrl: string; |
| description?: string; |
| } |
| interface Oauth2ApplicationSecurity { |
| type: 'oauth2'; |
| flow: 'application'; |
| scopes?: Oauth2Scopes; |
| tokenUrl: string; |
| description?: string; |
| } |
| interface Oauth2ImplicitSecurity { |
| type: 'oauth2'; |
| flow: 'implicit'; |
| scopes?: Oauth2Scopes; |
| authorizationUrl: string; |
| description?: string; |
| } |
| interface Oauth2PasswordSecurity { |
| type: 'oauth2'; |
| flow: 'password'; |
| scopes?: Oauth2Scopes; |
| tokenUrl: string; |
| description?: string; |
| } |
| interface Oauth2Scopes { |
| [name: string]: string; |
| } |
| interface Operation { |
| tags?: string[]; |
| summary?: string; |
| description?: string; |
| externalDocs?: ExternalDocs; |
| operationId?: string; |
| produces?: MimeType[]; |
| consumes?: MimeType[]; |
| parameters?: ParametersList; |
| responses: Responses; |
| schemes?: SchemesList; |
| deprecated?: boolean; |
| security?: Security; |
| } |
| type Parameter = BodyParameter | NonBodyParameter; |
| interface ParameterDefinitions { |
| [name: string]: Parameter; |
| } |
| type ParametersList = Array<Parameter | JsonReference>; |
| interface PathItem { |
| $ref?: string; |
| get?: Operation; |
| put?: Operation; |
| post?: Operation; |
| delete?: Operation; |
| options?: Operation; |
| head?: Operation; |
| patch?: Operation; |
| parameters?: ParametersList; |
| } |
| interface PathParameterSubSchema { |
| required: 'true'; |
| in?: 'path'; |
| description?: string; |
| name?: string; |
| type?: 'string' | 'number' | 'boolean' | 'integer' | 'array'; |
| format?: string; |
| items?: PrimitivesItems; |
| collectionFormat?: CollectionFormat; |
| default?: Default; |
| maximum?: Maximum; |
| exclusiveMaximum?: ExclusiveMaximum; |
| minimum?: Minimum; |
| exclusiveMinimum?: ExclusiveMinimum; |
| maxLength?: MaxLength; |
| minLength?: MinLength; |
| pattern?: Pattern; |
| maxItems?: MaxItems; |
| minItems?: MinItems; |
| uniqueItems?: UniqueItems; |
| enum?: Enum; |
| multipleOf?: MultipleOf; |
| } |
| interface Paths { |
| [path: string]: PathItem; |
| } |
| type Pattern = JsonSchemaOrg.Draft04.Schema.Properties.Pattern; |
| interface PrimitivesItems { |
| type?: 'string' | 'number' | 'integer' | 'boolean' | 'array'; |
| format?: string; |
| items?: PrimitivesItems; |
| collectionFormat?: CollectionFormat; |
| default?: Default; |
| maximum?: Maximum; |
| exclusiveMaximum?: ExclusiveMaximum; |
| minimum?: Minimum; |
| exclusiveMinimum?: ExclusiveMinimum; |
| maxLength?: MaxLength; |
| minLength?: MinLength; |
| pattern?: Pattern; |
| maxItems?: MaxItems; |
| minItems?: MinItems; |
| uniqueItems?: UniqueItems; |
| enum?: Enum; |
| multipleOf?: MultipleOf; |
| } |
| interface QueryParameterSubSchema { |
| required?: boolean; |
| in?: 'query'; |
| description?: string; |
| name?: string; |
| allowEmptyValue?: boolean; |
| type?: 'string' | 'number' | 'boolean' | 'integer' | 'array'; |
| format?: string; |
| items?: PrimitivesItems; |
| collectionFormat?: CollectionFormatWithMulti; |
| default?: Default; |
| maximum?: Maximum; |
| exclusiveMaximum?: ExclusiveMaximum; |
| minimum?: Minimum; |
| exclusiveMinimum?: ExclusiveMinimum; |
| maxLength?: MaxLength; |
| minLength?: MinLength; |
| pattern?: Pattern; |
| maxItems?: MaxItems; |
| minItems?: MinItems; |
| uniqueItems?: UniqueItems; |
| enum?: Enum; |
| multipleOf?: MultipleOf; |
| } |
| interface Response { |
| description: string; |
| schema?: JsonSchemaOrg.Draft04.Schema | FileSchema; |
| headers?: Headers; |
| examples?: Examples; |
| } |
| interface ResponseDefinitions { |
| [name: string]: Response; |
| } |
| type ResponseValue = Response | JsonReference; |
| interface Responses { |
| [name: string]: ResponseValue; |
| } |
| type SchemesList = Array<'http' | 'https' | 'ws' | 'wss'>; |
| type Security = SecurityRequirement[]; |
| interface SecurityDefinitions { |
| [name: string]: BasicAuthenticationSecurity | ApiKeySecurity | Oauth2ImplicitSecurity | Oauth2PasswordSecurity | Oauth2ApplicationSecurity | Oauth2AccessCodeSecurity; |
| } |
| interface SecurityRequirement { |
| [name: string]: string[]; |
| } |
| interface Tag { |
| name: string; |
| description?: string; |
| externalDocs?: ExternalDocs; |
| } |
| type UniqueItems = JsonSchemaOrg.Draft04.Schema.Properties.UniqueItems; |
| interface VendorExtension { |
| [name: string]: any; |
| } |
| interface Xml { |
| name?: string; |
| namespace?: string; |
| prefix?: string; |
| attribute?: boolean; |
| wrapped?: boolean; |
| } |
| } |
| } |
| } |
| } |