Skip to content

Latest commit

 

History

History
530 lines (287 loc) · 11.1 KB

File metadata and controls

530 lines (287 loc) · 11.1 KB

api-typescript-generator / Modules / openapi / OpenApiExpandedSchema

Interface: OpenApiExpandedSchema

openapi.OpenApiExpandedSchema

The OpenAPI schema with all properties expanded (without "true" and "false" shortcuts).

Table of contents

Properties

Properties

$comment

Optional $comment: string

A comment to describe the schema.

See

https://json-schema.org/understanding-json-schema/reference/comments#comments


additionalProperties

Optional additionalProperties: OpenApiSchema

The schema of the additional properties of the object.

See

https://json-schema.org/understanding-json-schema/reference/object#additionalproperties


allOf

Optional allOf: OpenApiSchema[]

(AND) Must be valid against all of the subschemas.

See

https://json-schema.org/understanding-json-schema/reference/combining#allOf


anyOf

Optional anyOf: OpenApiSchema[]

(OR) Must be valid against any of the subschemas.

See

https://json-schema.org/understanding-json-schema/reference/combining#anyOf


const

Optional const: OpenApiSchemaPrimitiveValue

The value must be exactly the given value.

See

https://json-schema.org/understanding-json-schema/reference/const


contains

Optional contains: OpenApiSchema

The schema to check if array has specific items.

See

https://json-schema.org/understanding-json-schema/reference/array#contains


default

Optional default: unknown

A default value for the schema.

See

https://json-schema.org/understanding-json-schema/reference/annotations


deprecated

Optional deprecated: boolean

Whether the schema is deprecated.

See

https://json-schema.org/understanding-json-schema/reference/annotations


description

Optional description: string

A description to describe the schema.

See

https://json-schema.org/understanding-json-schema/reference/annotations


discriminator

Optional discriminator: Object

A discriminator for polymorphism.

See

https://swagger.io/specification/#composition-and-inheritance-polymorphism

Type declaration

Name Type
mapping? Record<string, string>
propertyName string

enum

Optional enum: OpenApiSchemaPrimitiveValue[]

The value must be one of the given values.

See

https://json-schema.org/understanding-json-schema/reference/enum


example

Optional example: unknown

An example for the schema.

See

https://json-schema.org/understanding-json-schema/reference/annotations


examples

Optional examples: Record<string, OpenApiExample>

Examples for the schema.

See

https://swagger.io/specification/#example-object


exclusiveMaximum

Optional exclusiveMaximum: number

The number must have a lower value than the given value.

See

https://json-schema.org/understanding-json-schema/reference/numeric#range


exclusiveMinimum

Optional exclusiveMinimum: number

The number must have a higher value than the given value.

See

https://json-schema.org/understanding-json-schema/reference/numeric#range


externalDocumentation

Optional externalDocumentation: OpenApiExternalDocumentation

A reference to an external documentation.

See

https://swagger.io/specification/#external-documentation-object


format

Optional format: OpenApiFormats


items

Optional items: OpenApiSchema

The schema of the items in the array.

See

https://json-schema.org/understanding-json-schema/reference/array#items


maxContains

Optional maxContains: number

The maximum number of items in the array that must be valid against the contains schema.

See

https://json-schema.org/understanding-json-schema/reference/array#mincontains-maxcontains


maxItems

Optional maxItems: number

The maximum number of items in the array.

See

https://json-schema.org/understanding-json-schema/reference/array#length


maxLength

Optional maxLength: number

The maximum length of the string.

See

https://json-schema.org/understanding-json-schema/reference/string#length


maxProperties

Optional maxProperties: number

Maximum number of properties in the object.

See

https://json-schema.org/understanding-json-schema/reference/object#size


maximum

Optional maximum: number

The maximum value of the number.

See

https://json-schema.org/understanding-json-schema/reference/numeric#range


minContains

Optional minContains: number

The minimum number of items in the array that must be valid against the contains schema.

See

https://json-schema.org/understanding-json-schema/reference/array#mincontains-maxcontains


minItems

Optional minItems: number

The minimum number of items in the array.

See

https://json-schema.org/understanding-json-schema/reference/array#length


minLength

Optional minLength: number

The minimum length of the string.

See

https://json-schema.org/understanding-json-schema/reference/string#length


minProperties

Optional minProperties: number

Minimum number of properties in the object.

See

https://json-schema.org/understanding-json-schema/reference/object#size


minimum

Optional minimum: number

The minimum value of the number.

See

https://json-schema.org/understanding-json-schema/reference/numeric#range


multipleOf

Optional multipleOf: number

The number must be a multiple of the given value.

See

https://json-schema.org/understanding-json-schema/reference/numeric#multiples


name

Optional name: string

The name of the schema. Used for TypeScript generation.


not

Optional not: OpenApiSchema

(NOT) Must not be valid against the given schema.

See

https://json-schema.org/understanding-json-schema/reference/combining#not


nullable

Optional nullable: boolean


oneOf

Optional oneOf: OpenApiSchema[]

(XOR) Must be valid against exactly one of the subschemas.

See

https://json-schema.org/understanding-json-schema/reference/combining#oneOf


pattern

Optional pattern: string

The RegEx pattern the string must match.

See

https://json-schema.org/understanding-json-schema/reference/string#regexp


patternProperties

Optional patternProperties: Record<string, OpenApiSchema>

The schema of the properties of the object that match the pattern.

See

https://json-schema.org/understanding-json-schema/reference/object#patternProperties


prefixItems

Optional prefixItems: OpenApiSchema[]

The schema to check if array has specific items at the beginning.

See

https://json-schema.org/understanding-json-schema/reference/array#tupleValidation


properties

Optional properties: Record<string, OpenApiSchema>

The schema of the properties of the object.

See

https://json-schema.org/understanding-json-schema/reference/object#properties


required

Optional required: string[]

The required properties of the object.

See

https://json-schema.org/understanding-json-schema/reference/object#required


title

Optional title: string

A title to describe the schema.

See

https://json-schema.org/understanding-json-schema/reference/annotations


type

Optional type: "object" | OpenApiPrimitiveTypes | OpenApiPrimitiveTypes[] | "array"


uniqueItems

Optional uniqueItems: boolean

Whether the items in the array must be unique.

See

https://json-schema.org/understanding-json-schema/reference/array#uniqueItems