Class SwaggerV2Schema

OpenAPI 2.0 (Swagger 2.0) schema model

Based on Draft 4, but with restricted keywords and definitions

Restrictions (keywords not allowed)

  • oneOf
  • anyOf
  • patternProperties
  • not

https://swagger.io/specification/v2/#schemaObject

Hierarchy

  • SwaggerV2Schema

Indexable

[k: string]: any

Constructors

Properties

$ref?: string
$schema?: string
additionalProperties?: boolean | SwaggerV2Schema
allOf?: SwaggerV2Schema[]
default?: any
definitions?: {
    [key: string]: SwaggerV2Schema;
}

Type declaration

description?: string
discriminator?: string
enum?: any[]
example?: any
exclusiveMaximum?: boolean
exclusiveMinimum?: boolean
format?: string
id?: string
maxItems?: number
maxLength?: number
maxProperties?: number
maximum?: number
minItems?: number
minLength?: number
minProperties?: number
minimum?: number
multipleOf?: number
pattern?: string
properties?: {
    [key: string]: SwaggerV2Schema;
}

Type declaration

readOnly?: boolean
required?: string[]
title?: string
type?: string | string[]
uniqueItems?: boolean

Methods

Generated using TypeDoc