mirror of
https://github.com/LukeHagar/openapi-types.git
synced 2025-12-06 04:20:29 +00:00
Prettier formatting
This commit is contained in:
10
.prettierignore
Normal file
10
.prettierignore
Normal file
@@ -0,0 +1,10 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
*.min.js
|
||||
*.min.css
|
||||
pnpm-lock.yaml
|
||||
bun.lock
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
11
.prettierrc
Normal file
11
.prettierrc
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"semi": true,
|
||||
"trailingComma": "es5",
|
||||
"singleQuote": false,
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"bracketSpacing": true,
|
||||
"arrowParens": "avoid",
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
788
2.0/2.0.md
788
2.0/2.0.md
File diff suppressed because it is too large
Load Diff
@@ -107,64 +107,64 @@ import type { XMLObject } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ArraySchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "array" for array schemas.
|
||||
*
|
||||
* This property is required and must be set to "array" to indicate
|
||||
* that this schema represents an ordered collection of items.
|
||||
*
|
||||
* @example "array"
|
||||
*/
|
||||
type: "array";
|
||||
/**
|
||||
* The type of the schema. Must be "array" for array schemas.
|
||||
*
|
||||
* This property is required and must be set to "array" to indicate
|
||||
* that this schema represents an ordered collection of items.
|
||||
*
|
||||
* @example "array"
|
||||
*/
|
||||
type: "array";
|
||||
|
||||
/**
|
||||
* Required if type is "array". Describes the type of items in the array.
|
||||
*
|
||||
* The definition is the same as the one from JSON Schema, but references
|
||||
* the Swagger Schema Object definition instead. This allows for complex
|
||||
* nested structures and references to other schema definitions.
|
||||
*
|
||||
* @example { type: "string" }
|
||||
* @example { $ref: "#/definitions/User" }
|
||||
* @example { type: "object", properties: { name: { type: "string" } } }
|
||||
*/
|
||||
items: Schema; // Forward declaration to avoid circular imports
|
||||
/**
|
||||
* Required if type is "array". Describes the type of items in the array.
|
||||
*
|
||||
* The definition is the same as the one from JSON Schema, but references
|
||||
* the Swagger Schema Object definition instead. This allows for complex
|
||||
* nested structures and references to other schema definitions.
|
||||
*
|
||||
* @example { type: "string" }
|
||||
* @example { $ref: "#/definitions/User" }
|
||||
* @example { type: "object", properties: { name: { type: "string" } } }
|
||||
*/
|
||||
items: Schema; // Forward declaration to avoid circular imports
|
||||
|
||||
/**
|
||||
* An array is valid against "maxItems" if its length is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2 | JSON Schema Validation - maxItems}
|
||||
*
|
||||
* @example 10
|
||||
* @example 100
|
||||
*/
|
||||
maxItems?: number;
|
||||
/**
|
||||
* An array is valid against "maxItems" if its length is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2 | JSON Schema Validation - maxItems}
|
||||
*
|
||||
* @example 10
|
||||
* @example 100
|
||||
*/
|
||||
maxItems?: number;
|
||||
|
||||
/**
|
||||
* An array is valid against "minItems" if its length is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3 | JSON Schema Validation - minItems}
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
*/
|
||||
minItems?: number;
|
||||
/**
|
||||
* An array is valid against "minItems" if its length is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3 | JSON Schema Validation - minItems}
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
*/
|
||||
minItems?: number;
|
||||
|
||||
/**
|
||||
* An array is valid against "uniqueItems" if all its elements are unique.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4 | JSON Schema Validation - uniqueItems}
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
/**
|
||||
* An array is valid against "uniqueItems" if all its elements are unique.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4 | JSON Schema Validation - uniqueItems}
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "users", wrapped: true }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "users", wrapped: true }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
}
|
||||
|
||||
@@ -81,101 +81,101 @@ import type { XMLObject } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface BooleanSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "boolean" for boolean schemas.
|
||||
*
|
||||
* This property is required and must be set to "boolean" to indicate
|
||||
* that this schema represents true/false values.
|
||||
*
|
||||
* @example "boolean"
|
||||
*/
|
||||
type: "boolean";
|
||||
/**
|
||||
* The type of the schema. Must be "boolean" for boolean schemas.
|
||||
*
|
||||
* This property is required and must be set to "boolean" to indicate
|
||||
* that this schema represents true/false values.
|
||||
*
|
||||
* @example "boolean"
|
||||
*/
|
||||
type: "boolean";
|
||||
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "date"
|
||||
* @example "email"
|
||||
* @example "uuid"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "date"
|
||||
* @example "email"
|
||||
* @example "uuid"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "isActive", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "isActive", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
}
|
||||
|
||||
@@ -79,102 +79,102 @@ import type { XMLObject } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface FileSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "file" for file schemas.
|
||||
*
|
||||
* This property is required and must be set to "file" to indicate
|
||||
* that this schema represents file data. This is a Swagger 2.0 specific
|
||||
* type that extends JSON Schema.
|
||||
*
|
||||
* @example "file"
|
||||
*/
|
||||
type: "file";
|
||||
/**
|
||||
* The type of the schema. Must be "file" for file schemas.
|
||||
*
|
||||
* This property is required and must be set to "file" to indicate
|
||||
* that this schema represents file data. This is a Swagger 2.0 specific
|
||||
* type that extends JSON Schema.
|
||||
*
|
||||
* @example "file"
|
||||
*/
|
||||
type: "file";
|
||||
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "date"
|
||||
* @example "email"
|
||||
* @example "uuid"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "date"
|
||||
* @example "email"
|
||||
* @example "uuid"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "fileData", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "fileData", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
}
|
||||
|
||||
@@ -94,150 +94,150 @@ import type { XMLObject } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface IntegerSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "integer" for integer schemas.
|
||||
*
|
||||
* This property is required and must be set to "integer" to indicate
|
||||
* that this schema represents whole number data without fractional components.
|
||||
*
|
||||
* @example "integer"
|
||||
*/
|
||||
type: "integer";
|
||||
/**
|
||||
* The type of the schema. Must be "integer" for integer schemas.
|
||||
*
|
||||
* This property is required and must be set to "integer" to indicate
|
||||
* that this schema represents whole number data without fractional components.
|
||||
*
|
||||
* @example "integer"
|
||||
*/
|
||||
type: "integer";
|
||||
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "int64"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "int64"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* A number is valid against "multipleOf" if the result of the division
|
||||
* of the instance by this keyword's value is an integer.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1 | JSON Schema Validation - multipleOf}
|
||||
*
|
||||
* @example 2
|
||||
* @example 1
|
||||
*/
|
||||
multipleOf?: number;
|
||||
/**
|
||||
* A number is valid against "multipleOf" if the result of the division
|
||||
* of the instance by this keyword's value is an integer.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1 | JSON Schema Validation - multipleOf}
|
||||
*
|
||||
* @example 2
|
||||
* @example 1
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "maximum" if it is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 | JSON Schema Validation - maximum}
|
||||
*
|
||||
* @example 100
|
||||
* @example 2147483647
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* A number is valid against "maximum" if it is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 | JSON Schema Validation - maximum}
|
||||
*
|
||||
* @example 100
|
||||
* @example 2147483647
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "exclusiveMaximum" if it is strictly less than this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 | JSON Schema Validation - exclusiveMaximum}
|
||||
*
|
||||
* @example false
|
||||
* @example true
|
||||
*/
|
||||
exclusiveMaximum?: boolean;
|
||||
/**
|
||||
* A number is valid against "exclusiveMaximum" if it is strictly less than this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2 | JSON Schema Validation - exclusiveMaximum}
|
||||
*
|
||||
* @example false
|
||||
* @example true
|
||||
*/
|
||||
exclusiveMaximum?: boolean;
|
||||
|
||||
/**
|
||||
* A number is valid against "minimum" if it is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 | JSON Schema Validation - minimum}
|
||||
*
|
||||
* @example 0
|
||||
* @example 1
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* A number is valid against "minimum" if it is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 | JSON Schema Validation - minimum}
|
||||
*
|
||||
* @example 0
|
||||
* @example 1
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "exclusiveMinimum" if it is strictly greater than this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 | JSON Schema Validation - exclusiveMinimum}
|
||||
*
|
||||
* @example false
|
||||
* @example true
|
||||
*/
|
||||
exclusiveMinimum?: boolean;
|
||||
/**
|
||||
* A number is valid against "exclusiveMinimum" if it is strictly greater than this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3 | JSON Schema Validation - exclusiveMinimum}
|
||||
*
|
||||
* @example false
|
||||
* @example true
|
||||
*/
|
||||
exclusiveMinimum?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "userId", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "userId", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
}
|
||||
|
||||
@@ -118,98 +118,98 @@ import type { XMLObject } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ObjectSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "object" for object schemas.
|
||||
*
|
||||
* This property is required and must be set to "object" to indicate
|
||||
* that this schema represents structured data with named properties.
|
||||
*
|
||||
* @example "object"
|
||||
*/
|
||||
type?: "object";
|
||||
/**
|
||||
* The type of the schema. Must be "object" for object schemas.
|
||||
*
|
||||
* This property is required and must be set to "object" to indicate
|
||||
* that this schema represents structured data with named properties.
|
||||
*
|
||||
* @example "object"
|
||||
*/
|
||||
type?: "object";
|
||||
|
||||
/**
|
||||
* The properties of the object. The definition is the same as the one from
|
||||
* JSON Schema, but references the Swagger Schema Object definition instead.
|
||||
*
|
||||
* Each property name maps to a schema definition that describes the type
|
||||
* and validation rules for that property. Properties can be of any type
|
||||
* supported by Swagger schemas, including primitives, objects, arrays,
|
||||
* and references.
|
||||
*
|
||||
* @example { name: { type: "string" }, age: { type: "integer" } }
|
||||
* @example { address: { $ref: "#/definitions/Address" } }
|
||||
*/
|
||||
properties?: Record<string, Schema>; // Forward declaration to avoid circular imports
|
||||
/**
|
||||
* The properties of the object. The definition is the same as the one from
|
||||
* JSON Schema, but references the Swagger Schema Object definition instead.
|
||||
*
|
||||
* Each property name maps to a schema definition that describes the type
|
||||
* and validation rules for that property. Properties can be of any type
|
||||
* supported by Swagger schemas, including primitives, objects, arrays,
|
||||
* and references.
|
||||
*
|
||||
* @example { name: { type: "string" }, age: { type: "integer" } }
|
||||
* @example { address: { $ref: "#/definitions/Address" } }
|
||||
*/
|
||||
properties?: Record<string, Schema>; // Forward declaration to avoid circular imports
|
||||
|
||||
/**
|
||||
* A list of required properties. Properties marked as required being true
|
||||
* MUST be present in the object.
|
||||
*
|
||||
* This array contains the names of properties that must be present in
|
||||
* any valid instance of this object schema. Properties not listed here
|
||||
* are considered optional.
|
||||
*
|
||||
* @example ["name", "email"]
|
||||
* @example ["id", "type", "createdAt"]
|
||||
*/
|
||||
required?: string[];
|
||||
/**
|
||||
* A list of required properties. Properties marked as required being true
|
||||
* MUST be present in the object.
|
||||
*
|
||||
* This array contains the names of properties that must be present in
|
||||
* any valid instance of this object schema. Properties not listed here
|
||||
* are considered optional.
|
||||
*
|
||||
* @example ["name", "email"]
|
||||
* @example ["id", "type", "createdAt"]
|
||||
*/
|
||||
required?: string[];
|
||||
|
||||
/**
|
||||
* Additional properties for the object. Can be a boolean or a schema.
|
||||
* The definition is the same as the one from JSON Schema, but references
|
||||
* the Swagger Schema Object definition instead.
|
||||
*
|
||||
* - If true, additional properties of any type are allowed
|
||||
* - If false, no additional properties are allowed
|
||||
* - If a schema, additional properties must conform to that schema
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
* @example { type: "string" }
|
||||
* @example { $ref: "#/definitions/AdditionalProperty" }
|
||||
*/
|
||||
additionalProperties?: boolean | Schema; // Forward declaration to avoid circular imports
|
||||
/**
|
||||
* Additional properties for the object. Can be a boolean or a schema.
|
||||
* The definition is the same as the one from JSON Schema, but references
|
||||
* the Swagger Schema Object definition instead.
|
||||
*
|
||||
* - If true, additional properties of any type are allowed
|
||||
* - If false, no additional properties are allowed
|
||||
* - If a schema, additional properties must conform to that schema
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
* @example { type: "string" }
|
||||
* @example { $ref: "#/definitions/AdditionalProperty" }
|
||||
*/
|
||||
additionalProperties?: boolean | Schema; // Forward declaration to avoid circular imports
|
||||
|
||||
/**
|
||||
* An array of schemas that this schema must validate against.
|
||||
* All schemas in the array must be valid for the object to be valid.
|
||||
* The definition is the same as the one from JSON Schema, but references
|
||||
* the Swagger Schema Object definition instead.
|
||||
*
|
||||
* This enables schema composition and inheritance patterns, allowing
|
||||
* objects to extend or combine multiple base schemas.
|
||||
*
|
||||
* @example [{ $ref: "#/definitions/BaseUser" }, { type: "object", properties: { ... } }]
|
||||
* @example [{ $ref: "#/definitions/Identifiable" }, { $ref: "#/definitions/Timestamped" }]
|
||||
*/
|
||||
allOf?: Schema[]; // Forward declaration to avoid circular imports
|
||||
/**
|
||||
* An array of schemas that this schema must validate against.
|
||||
* All schemas in the array must be valid for the object to be valid.
|
||||
* The definition is the same as the one from JSON Schema, but references
|
||||
* the Swagger Schema Object definition instead.
|
||||
*
|
||||
* This enables schema composition and inheritance patterns, allowing
|
||||
* objects to extend or combine multiple base schemas.
|
||||
*
|
||||
* @example [{ $ref: "#/definitions/BaseUser" }, { type: "object", properties: { ... } }]
|
||||
* @example [{ $ref: "#/definitions/Identifiable" }, { $ref: "#/definitions/Timestamped" }]
|
||||
*/
|
||||
allOf?: Schema[]; // Forward declaration to avoid circular imports
|
||||
|
||||
/**
|
||||
* An object is valid against "maxProperties" if its number of properties is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.1 | JSON Schema Validation - maxProperties}
|
||||
*
|
||||
* @example 10
|
||||
* @example 50
|
||||
*/
|
||||
maxProperties?: number;
|
||||
/**
|
||||
* An object is valid against "maxProperties" if its number of properties is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.1 | JSON Schema Validation - maxProperties}
|
||||
*
|
||||
* @example 10
|
||||
* @example 50
|
||||
*/
|
||||
maxProperties?: number;
|
||||
|
||||
/**
|
||||
* An object is valid against "minProperties" if its number of properties is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.2 | JSON Schema Validation - minProperties}
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
*/
|
||||
minProperties?: number;
|
||||
/**
|
||||
* An object is valid against "minProperties" if its number of properties is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.4.2 | JSON Schema Validation - minProperties}
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
*/
|
||||
minProperties?: number;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "user", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "user", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
}
|
||||
|
||||
@@ -92,143 +92,143 @@ import type { XMLObject } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface StringSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "string" for string schemas.
|
||||
*
|
||||
* This property is required and must be set to "string" to indicate
|
||||
* that this schema represents string data.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#data-types | Swagger 2.0 Specification - type}
|
||||
*
|
||||
* @example "string"
|
||||
*/
|
||||
type: "string";
|
||||
/**
|
||||
* The type of the schema. Must be "string" for string schemas.
|
||||
*
|
||||
* This property is required and must be set to "string" to indicate
|
||||
* that this schema represents string data.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#data-types | Swagger 2.0 Specification - type}
|
||||
*
|
||||
* @example "string"
|
||||
*/
|
||||
type: "string";
|
||||
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "date"
|
||||
* @example "email"
|
||||
* @example "uuid"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the previously mentioned type.
|
||||
* See Swagger 2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Formats provide additional semantic information about the data type,
|
||||
* enabling more precise validation and better tooling support. Swagger 2.0
|
||||
* defines several standard formats, but custom formats are also allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#dataTypeFormat | Swagger 2.0 Data Type Formats}
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "date"
|
||||
* @example "email"
|
||||
* @example "uuid"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description should provide clear information about what the schema
|
||||
* represents and how it should be used. It's commonly displayed in API
|
||||
* documentation and code generation tools.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - title}
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* The title provides a human-readable name for the schema, often used
|
||||
* in documentation and UI displays. It should be concise but descriptive.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - title}
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Pet"
|
||||
* @example "Order"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - default}
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* Declares the value of the schema that the server will use if none is provided.
|
||||
* Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
|
||||
*
|
||||
* This is a Swagger 2.0 specific requirement that differs from JSON Schema.
|
||||
* The default value must be valid according to the schema's type and constraints.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - default}
|
||||
*
|
||||
* @example "defaultValue"
|
||||
* @example 10
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An instance validates successfully against this keyword if its value is equal to one of the elements in this keyword's array value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | JSON Schema Validation - enum}
|
||||
*
|
||||
* @example ["option1", "option2", "option3"]
|
||||
* @example ["red", "green", "blue"]
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - example}
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* A free-form property to include an example of an instance for this schema.
|
||||
*
|
||||
* Examples help developers understand how to use the schema and what kind
|
||||
* of data is expected. They are commonly used by documentation generators
|
||||
* and API testing tools.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#schema-object | Swagger 2.0 Specification - example}
|
||||
*
|
||||
* @example { name: "Puma", id: 1 }
|
||||
* @example "example string value"
|
||||
* @example 42
|
||||
* @example ["item1", "item2"]
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* A string is valid against "maxLength" if its length is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1 | JSON Schema Validation - maxLength}
|
||||
*
|
||||
* @example 100
|
||||
* @example 255
|
||||
*/
|
||||
maxLength?: number;
|
||||
/**
|
||||
* A string is valid against "maxLength" if its length is less than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1 | JSON Schema Validation - maxLength}
|
||||
*
|
||||
* @example 100
|
||||
* @example 255
|
||||
*/
|
||||
maxLength?: number;
|
||||
|
||||
/**
|
||||
* A string is valid against "minLength" if its length is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2 | JSON Schema Validation - minLength}
|
||||
*
|
||||
* @example 1
|
||||
* @example 8
|
||||
*/
|
||||
minLength?: number;
|
||||
/**
|
||||
* A string is valid against "minLength" if its length is greater than or equal to this value.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2 | JSON Schema Validation - minLength}
|
||||
*
|
||||
* @example 1
|
||||
* @example 8
|
||||
*/
|
||||
minLength?: number;
|
||||
|
||||
/**
|
||||
* A string is valid against "pattern" if the regular expression matches the string successfully.
|
||||
* The regular expression syntax follows ECMA 262.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3 | JSON Schema Validation - pattern}
|
||||
* @see {@link https://www.ecma-international.org/ecma-262/5.1/#sec-15.10 | ECMA 262 Regular Expression Syntax}
|
||||
*
|
||||
* @example "^[a-zA-Z0-9]+$"
|
||||
* @example "^\\d{4}-\\d{2}-\\d{2}$"
|
||||
*/
|
||||
pattern?: string;
|
||||
/**
|
||||
* A string is valid against "pattern" if the regular expression matches the string successfully.
|
||||
* The regular expression syntax follows ECMA 262.
|
||||
*
|
||||
* @see {@link https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3 | JSON Schema Validation - pattern}
|
||||
* @see {@link https://www.ecma-international.org/ecma-262/5.1/#sec-15.10 | ECMA 262 Regular Expression Syntax}
|
||||
*
|
||||
* @example "^[a-zA-Z0-9]+$"
|
||||
* @example "^\\d{4}-\\d{2}-\\d{2}$"
|
||||
*/
|
||||
pattern?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "userName", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* @example { name: "userName", attribute: false }
|
||||
*/
|
||||
xml?: XMLObject;
|
||||
}
|
||||
|
||||
@@ -59,17 +59,17 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Examples extends Extension {
|
||||
/**
|
||||
* The name of the property MUST be one of the Operation produces values
|
||||
* (either implicit or inherited). The value SHOULD be an example of what
|
||||
* such a response would look like.
|
||||
*
|
||||
* The property name corresponds to a MIME type that the operation can produce.
|
||||
* The value should be a realistic example of the response data in that format.
|
||||
*
|
||||
* @example { "application/json": { name: "Puma", type: "Dog" } }
|
||||
* @example { "application/xml": "<pet><name>Puma</name></pet>" }
|
||||
* @example { "text/plain": "Success" }
|
||||
*/
|
||||
[mimeType: string]: unknown;
|
||||
/**
|
||||
* The name of the property MUST be one of the Operation produces values
|
||||
* (either implicit or inherited). The value SHOULD be an example of what
|
||||
* such a response would look like.
|
||||
*
|
||||
* The property name corresponds to a MIME type that the operation can produce.
|
||||
* The value should be a realistic example of the response data in that format.
|
||||
*
|
||||
* @example { "application/json": { name: "Puma", type: "Dog" } }
|
||||
* @example { "application/xml": "<pet><name>Puma</name></pet>" }
|
||||
* @example { "text/plain": "Success" }
|
||||
*/
|
||||
[mimeType: string]: unknown;
|
||||
}
|
||||
|
||||
@@ -96,20 +96,20 @@
|
||||
* ```
|
||||
*/
|
||||
export type Extension = {
|
||||
/**
|
||||
* Vendor extensions allow adding custom properties to Swagger objects.
|
||||
* All extension property names MUST begin with "x-" followed by any valid identifier.
|
||||
* The value can be any valid JSON value (null, primitive, array, or object).
|
||||
*
|
||||
* Extensions enable API providers to add custom functionality and metadata
|
||||
* to their specifications without breaking compatibility with standard
|
||||
* Swagger tools. They should be used consistently and documented properly.
|
||||
*
|
||||
* @example { "x-internal-id": "12345" }
|
||||
* @example { "x-custom-feature": { enabled: true, version: "1.0" } }
|
||||
* @example { "x-tags": ["internal", "beta"] }
|
||||
* @example { "x-deprecated": true }
|
||||
* @example { "x-optional-field": null }
|
||||
*/
|
||||
[K in `x-${string}`]: unknown;
|
||||
/**
|
||||
* Vendor extensions allow adding custom properties to Swagger objects.
|
||||
* All extension property names MUST begin with "x-" followed by any valid identifier.
|
||||
* The value can be any valid JSON value (null, primitive, array, or object).
|
||||
*
|
||||
* Extensions enable API providers to add custom functionality and metadata
|
||||
* to their specifications without breaking compatibility with standard
|
||||
* Swagger tools. They should be used consistently and documented properly.
|
||||
*
|
||||
* @example { "x-internal-id": "12345" }
|
||||
* @example { "x-custom-feature": { enabled: true, version: "1.0" } }
|
||||
* @example { "x-tags": ["internal", "beta"] }
|
||||
* @example { "x-deprecated": true }
|
||||
* @example { "x-optional-field": null }
|
||||
*/
|
||||
[K in `x-${string}`]: unknown;
|
||||
};
|
||||
|
||||
@@ -84,36 +84,36 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ExternalDocumentation extends Extension {
|
||||
/**
|
||||
* A short description of the target documentation. GFM syntax can be used for
|
||||
* rich text representation.
|
||||
*
|
||||
* This description provides context about what the external documentation
|
||||
* contains and helps developers understand when and why they should
|
||||
* reference it.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#external-documentation-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "Find more info here"
|
||||
* @example "Complete API documentation with examples and tutorials"
|
||||
* @example "SDK documentation and code examples"
|
||||
* @example "Step-by-step integration guide"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the target documentation. GFM syntax can be used for
|
||||
* rich text representation.
|
||||
*
|
||||
* This description provides context about what the external documentation
|
||||
* contains and helps developers understand when and why they should
|
||||
* reference it.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#external-documentation-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "Find more info here"
|
||||
* @example "Complete API documentation with examples and tutorials"
|
||||
* @example "SDK documentation and code examples"
|
||||
* @example "Step-by-step integration guide"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The URL for the target documentation. Value MUST be in the format of a URL.
|
||||
* This field is required.
|
||||
*
|
||||
* The URL should point to a valid, accessible resource that provides
|
||||
* additional documentation about the API or specific aspects of it.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#external-documentation-object | Swagger 2.0 Specification - url}
|
||||
*
|
||||
* @example "https://swagger.io"
|
||||
* @example "https://docs.example.com/api"
|
||||
* @example "https://github.com/example/sdk"
|
||||
* @example "https://example.com/integration-guide"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The URL for the target documentation. Value MUST be in the format of a URL.
|
||||
* This field is required.
|
||||
*
|
||||
* The URL should point to a valid, accessible resource that provides
|
||||
* additional documentation about the API or specific aspects of it.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#external-documentation-object | Swagger 2.0 Specification - url}
|
||||
*
|
||||
* @example "https://swagger.io"
|
||||
* @example "https://docs.example.com/api"
|
||||
* @example "https://github.com/example/sdk"
|
||||
* @example "https://example.com/integration-guide"
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
80
2.0/index.ts
80
2.0/index.ts
@@ -2,67 +2,67 @@
|
||||
// This file serves as the main entry point for all OpenAPI 2.0 type definitions
|
||||
|
||||
export type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
FileSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
// Individual schema types
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
FileSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
// Individual schema types
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
export type { Examples } from "./example";
|
||||
// Re-export all types for convenience
|
||||
export type {
|
||||
// Core types
|
||||
Extension,
|
||||
// Core types
|
||||
Extension,
|
||||
} from "./extensions";
|
||||
export type { ExternalDocumentation } from "./externalDocs";
|
||||
export type {
|
||||
Contact,
|
||||
// Info types
|
||||
Info,
|
||||
License,
|
||||
Contact,
|
||||
// Info types
|
||||
Info,
|
||||
License,
|
||||
} from "./info";
|
||||
export type {
|
||||
Header,
|
||||
Items,
|
||||
Operation,
|
||||
Parameter,
|
||||
// Path types
|
||||
PathItem,
|
||||
Paths,
|
||||
Response,
|
||||
Header,
|
||||
Items,
|
||||
Operation,
|
||||
Parameter,
|
||||
// Path types
|
||||
PathItem,
|
||||
Paths,
|
||||
Response,
|
||||
} from "./paths";
|
||||
export type {
|
||||
// References
|
||||
BaseReference,
|
||||
Reference,
|
||||
// References
|
||||
BaseReference,
|
||||
Reference,
|
||||
} from "./references";
|
||||
export type {
|
||||
Definitions,
|
||||
ParametersDefinitions,
|
||||
ResponsesDefinitions,
|
||||
// Schema types
|
||||
Schema,
|
||||
XML,
|
||||
Definitions,
|
||||
ParametersDefinitions,
|
||||
ResponsesDefinitions,
|
||||
// Schema types
|
||||
Schema,
|
||||
XML,
|
||||
} from "./schema";
|
||||
export type {
|
||||
Scopes,
|
||||
SecurityDefinitions,
|
||||
SecurityRequirement,
|
||||
// Security types
|
||||
SecurityScheme,
|
||||
Scopes,
|
||||
SecurityDefinitions,
|
||||
SecurityRequirement,
|
||||
// Security types
|
||||
SecurityScheme,
|
||||
} from "./security";
|
||||
// Export the main specification type
|
||||
export type { Specification } from "./spec";
|
||||
export type {
|
||||
// Utility types
|
||||
Tag,
|
||||
// Utility types
|
||||
Tag,
|
||||
} from "./tags";
|
||||
export type {
|
||||
// XML Object
|
||||
XMLObject,
|
||||
// XML Object
|
||||
XMLObject,
|
||||
} from "./xml";
|
||||
|
||||
// All supporting types are now defined in their respective modules:
|
||||
|
||||
200
2.0/info.ts
200
2.0/info.ts
@@ -27,64 +27,64 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Info extends Extension {
|
||||
/**
|
||||
* The title of the application. This field is required.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - title}
|
||||
*
|
||||
* @example "Swagger Sample App"
|
||||
* @example "My API"
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* The title of the application. This field is required.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - title}
|
||||
*
|
||||
* @example "Swagger Sample App"
|
||||
* @example "My API"
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* A short description of the application. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "This is a sample server Petstore server."
|
||||
* @example "A comprehensive API for managing user data"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the application. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "This is a sample server Petstore server."
|
||||
* @example "A comprehensive API for managing user data"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The Terms of Service for the API.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - termsOfService}
|
||||
*
|
||||
* @example "http://swagger.io/terms/"
|
||||
* @example "https://example.com/terms"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
/**
|
||||
* The Terms of Service for the API.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - termsOfService}
|
||||
*
|
||||
* @example "http://swagger.io/terms/"
|
||||
* @example "https://example.com/terms"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - contact}
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - contact}
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - license}
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "http://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - license}
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "http://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
|
||||
/**
|
||||
* Provides the version of the application API (not to be confused with the specification version).
|
||||
* This field is required.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - version}
|
||||
*
|
||||
* @example "1.0.1"
|
||||
* @example "2.0.0"
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* Provides the version of the application API (not to be confused with the specification version).
|
||||
* This field is required.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - version}
|
||||
*
|
||||
* @example "1.0.1"
|
||||
* @example "2.0.0"
|
||||
*/
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,35 +103,35 @@ export interface Info extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Contact extends Extension {
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#contact-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "John Doe"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#contact-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "John Doe"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URL pointing to the contact information. MUST be in the format of a URL.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#contact-object | Swagger 2.0 Specification - url}
|
||||
*
|
||||
* @example "http://www.swagger.io/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* The URL pointing to the contact information. MUST be in the format of a URL.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#contact-object | Swagger 2.0 Specification - url}
|
||||
*
|
||||
* @example "http://www.swagger.io/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* The email address of the contact person/organization. MUST be in the format of an email address.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#contact-object | Swagger 2.0 Specification - email}
|
||||
*
|
||||
* @example "support@swagger.io"
|
||||
* @example "contact@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* The email address of the contact person/organization. MUST be in the format of an email address.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#contact-object | Swagger 2.0 Specification - email}
|
||||
*
|
||||
* @example "support@swagger.io"
|
||||
* @example "contact@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,25 +202,25 @@ export interface Contact extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface License extends Extension {
|
||||
/**
|
||||
* The license name used for the API. This field is required.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#license-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "MIT License"
|
||||
* @example "Apache License 2.0"
|
||||
* @example "Proprietary Foo License"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The license name used for the API. This field is required.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#license-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "MIT License"
|
||||
* @example "Apache License 2.0"
|
||||
* @example "Proprietary Foo License"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A URL to the license used for the API. MUST be in the format of a URL.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#license-object | Swagger 2.0 Specification - url}
|
||||
*
|
||||
* @example "https://opensource.org/license/mit/"
|
||||
* @example "https://www.apache.org/licenses/LICENSE-2.0"
|
||||
* @example "https://example.com/licenses/foo-1.0"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A URL to the license used for the API. MUST be in the format of a URL.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#license-object | Swagger 2.0 Specification - url}
|
||||
*
|
||||
* @example "https://opensource.org/license/mit/"
|
||||
* @example "https://www.apache.org/licenses/LICENSE-2.0"
|
||||
* @example "https://example.com/licenses/foo-1.0"
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
1398
2.0/paths.ts
1398
2.0/paths.ts
File diff suppressed because it is too large
Load Diff
@@ -82,24 +82,24 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface BaseReference {
|
||||
/**
|
||||
* The reference string. This field is required.
|
||||
*
|
||||
* The reference string follows JSON Pointer syntax and can reference:
|
||||
* - Definitions within the same document using "#/definitions/Name"
|
||||
* - Parameters within the same document using "#/parameters/Name"
|
||||
* - Responses within the same document using "#/responses/Name"
|
||||
* - External files using relative or absolute URLs
|
||||
* - Specific parts of external files using fragment identifiers
|
||||
*
|
||||
* @example "#/definitions/Pet"
|
||||
* @example "#/parameters/skipParam"
|
||||
* @example "#/responses/NotFound"
|
||||
* @example "Pet.json"
|
||||
* @example "definitions.json#/Pet"
|
||||
* @example "https://api.example.com/schemas/User.json"
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* The reference string. This field is required.
|
||||
*
|
||||
* The reference string follows JSON Pointer syntax and can reference:
|
||||
* - Definitions within the same document using "#/definitions/Name"
|
||||
* - Parameters within the same document using "#/parameters/Name"
|
||||
* - Responses within the same document using "#/responses/Name"
|
||||
* - External files using relative or absolute URLs
|
||||
* - Specific parts of external files using fragment identifiers
|
||||
*
|
||||
* @example "#/definitions/Pet"
|
||||
* @example "#/parameters/skipParam"
|
||||
* @example "#/responses/NotFound"
|
||||
* @example "Pet.json"
|
||||
* @example "definitions.json#/Pet"
|
||||
* @example "https://api.example.com/schemas/User.json"
|
||||
*/
|
||||
$ref: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
FileSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
FileSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
import type { BaseReference } from "./references";
|
||||
import type { XMLObject } from "./xml";
|
||||
@@ -149,14 +149,14 @@ import type { XMLObject } from "./xml";
|
||||
* ```
|
||||
*/
|
||||
export type Schema =
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| FileSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| BaseReference;
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| FileSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| BaseReference;
|
||||
|
||||
/**
|
||||
* -----
|
||||
|
||||
226
2.0/security.ts
226
2.0/security.ts
@@ -38,105 +38,105 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityScheme extends Extension {
|
||||
/**
|
||||
* The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
|
||||
* This field is required.
|
||||
*
|
||||
* - **basic**: Basic HTTP authentication
|
||||
* - **apiKey**: API key authentication (header or query parameter)
|
||||
* - **oauth2**: OAuth 2.0 authentication
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - type}
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "oauth2"
|
||||
* @example "basic"
|
||||
*/
|
||||
type: "basic" | "apiKey" | "oauth2";
|
||||
/**
|
||||
* The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
|
||||
* This field is required.
|
||||
*
|
||||
* - **basic**: Basic HTTP authentication
|
||||
* - **apiKey**: API key authentication (header or query parameter)
|
||||
* - **oauth2**: OAuth 2.0 authentication
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - type}
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "oauth2"
|
||||
* @example "basic"
|
||||
*/
|
||||
type: "basic" | "apiKey" | "oauth2";
|
||||
|
||||
/**
|
||||
* A short description for security scheme. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "API key for authentication"
|
||||
* @example "OAuth 2.0 with authorization code flow"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for security scheme. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "API key for authentication"
|
||||
* @example "OAuth 2.0 with authorization code flow"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The name of the header or query parameter to be used. This field is required
|
||||
* for apiKey type and applies to apiKey type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "Authorization"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The name of the header or query parameter to be used. This field is required
|
||||
* for apiKey type and applies to apiKey type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "Authorization"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The location of the API key. This field is required for apiKey type and
|
||||
* applies to apiKey type only. Valid values are "query" or "header".
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - in}
|
||||
*
|
||||
* @example "header"
|
||||
* @example "query"
|
||||
*/
|
||||
in?: "query" | "header";
|
||||
/**
|
||||
* The location of the API key. This field is required for apiKey type and
|
||||
* applies to apiKey type only. Valid values are "query" or "header".
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - in}
|
||||
*
|
||||
* @example "header"
|
||||
* @example "query"
|
||||
*/
|
||||
in?: "query" | "header";
|
||||
|
||||
/**
|
||||
* The flow used by the OAuth2 security scheme. This field is required for
|
||||
* oauth2 type and applies to oauth2 type only. Valid values are "implicit",
|
||||
* "password", "application" or "accessCode".
|
||||
*
|
||||
* - **implicit**: Implicit flow
|
||||
* - **password**: Resource owner password credentials flow
|
||||
* - **application**: Client credentials flow
|
||||
* - **accessCode**: Authorization code flow
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - flow}
|
||||
*
|
||||
* @example "accessCode"
|
||||
* @example "implicit"
|
||||
* @example "password"
|
||||
*/
|
||||
flow?: "implicit" | "password" | "application" | "accessCode";
|
||||
/**
|
||||
* The flow used by the OAuth2 security scheme. This field is required for
|
||||
* oauth2 type and applies to oauth2 type only. Valid values are "implicit",
|
||||
* "password", "application" or "accessCode".
|
||||
*
|
||||
* - **implicit**: Implicit flow
|
||||
* - **password**: Resource owner password credentials flow
|
||||
* - **application**: Client credentials flow
|
||||
* - **accessCode**: Authorization code flow
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - flow}
|
||||
*
|
||||
* @example "accessCode"
|
||||
* @example "implicit"
|
||||
* @example "password"
|
||||
*/
|
||||
flow?: "implicit" | "password" | "application" | "accessCode";
|
||||
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This SHOULD be in the form of
|
||||
* a URL. This field is required for oauth2 type and applies to oauth2 type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - authorizationUrl}
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
* @example "https://api.example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This SHOULD be in the form of
|
||||
* a URL. This field is required for oauth2 type and applies to oauth2 type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - authorizationUrl}
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
* @example "https://api.example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
|
||||
/**
|
||||
* The token URL to be used for this flow. This SHOULD be in the form of a URL.
|
||||
* This field is required for oauth2 type and applies to oauth2 type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - tokenUrl}
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
* @example "https://api.example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
/**
|
||||
* The token URL to be used for this flow. This SHOULD be in the form of a URL.
|
||||
* This field is required for oauth2 type and applies to oauth2 type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - tokenUrl}
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
* @example "https://api.example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. The key is the scope name
|
||||
* and the value is a short description of the scope. This field is required for
|
||||
* oauth2 type and applies to oauth2 type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - scopes}
|
||||
*
|
||||
* @example { "read": "Read access to resources", "write": "Write access to resources" }
|
||||
* @example { "admin": "Administrative access" }
|
||||
*/
|
||||
scopes?: Scopes;
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. The key is the scope name
|
||||
* and the value is a short description of the scope. This field is required for
|
||||
* oauth2 type and applies to oauth2 type only.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-scheme-object | Swagger 2.0 Specification - scopes}
|
||||
*
|
||||
* @example { "read": "Read access to resources", "write": "Write access to resources" }
|
||||
* @example { "admin": "Administrative access" }
|
||||
*/
|
||||
scopes?: Scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,16 +154,16 @@ export interface SecurityScheme extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Scopes {
|
||||
/**
|
||||
* Maps between a name of a scope to a short description of it (as the value of the property).
|
||||
* The key is the scope name and the value is a short description of the scope.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#scopes-object | Swagger 2.0 Specification - scopes}
|
||||
*
|
||||
* @example { "read": "Read access to resources", "write": "Write access to resources" }
|
||||
* @example { "admin": "Administrative access" }
|
||||
*/
|
||||
[scopeName: string]: string;
|
||||
/**
|
||||
* Maps between a name of a scope to a short description of it (as the value of the property).
|
||||
* The key is the scope name and the value is a short description of the scope.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#scopes-object | Swagger 2.0 Specification - scopes}
|
||||
*
|
||||
* @example { "read": "Read access to resources", "write": "Write access to resources" }
|
||||
* @example { "admin": "Administrative access" }
|
||||
*/
|
||||
[scopeName: string]: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,17 +192,17 @@ export interface Scopes {
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityRequirement {
|
||||
/**
|
||||
* Each name must correspond to a security scheme which is declared in the Security Definitions.
|
||||
* If the security scheme is of type "oauth2", then the value is a list of scope names
|
||||
* required for the execution. For other security scheme types, the array MUST be empty.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-requirement-object | Swagger 2.0 Specification - security requirement}
|
||||
*
|
||||
* @example { "api_key": [] }
|
||||
* @example { "oauth2": ["read", "write"] }
|
||||
*/
|
||||
[schemeName: string]: string[];
|
||||
/**
|
||||
* Each name must correspond to a security scheme which is declared in the Security Definitions.
|
||||
* If the security scheme is of type "oauth2", then the value is a list of scope names
|
||||
* required for the execution. For other security scheme types, the array MUST be empty.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-requirement-object | Swagger 2.0 Specification - security requirement}
|
||||
*
|
||||
* @example { "api_key": [] }
|
||||
* @example { "oauth2": ["read", "write"] }
|
||||
*/
|
||||
[schemeName: string]: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
314
2.0/spec.ts
314
2.0/spec.ts
@@ -3,11 +3,7 @@ import type { ExternalDocumentation } from "./externalDocs";
|
||||
// Import all the major component types
|
||||
import type { Info } from "./info";
|
||||
import type { Paths } from "./paths";
|
||||
import type {
|
||||
Definitions,
|
||||
ParametersDefinitions,
|
||||
ResponsesDefinitions,
|
||||
} from "./schema";
|
||||
import type { Definitions, ParametersDefinitions, ResponsesDefinitions } from "./schema";
|
||||
import type { SecurityDefinitions, SecurityRequirement } from "./security";
|
||||
import type { Tag } from "./tags";
|
||||
|
||||
@@ -65,172 +61,172 @@ import type { Tag } from "./tags";
|
||||
* ```
|
||||
*/
|
||||
export type Specification = {
|
||||
/**
|
||||
* Specifies the Swagger specification version being used.
|
||||
* Must be "2.0" for this specification.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - swagger}
|
||||
*/
|
||||
swagger: "2.0";
|
||||
/**
|
||||
* Specifies the Swagger specification version being used.
|
||||
* Must be "2.0" for this specification.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - swagger}
|
||||
*/
|
||||
swagger: "2.0";
|
||||
|
||||
/**
|
||||
* Provides metadata about the API. The metadata can be used by the clients
|
||||
* if needed, and can be presented in the Swagger-UI for convenience.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - info}
|
||||
*/
|
||||
info: Info;
|
||||
/**
|
||||
* Provides metadata about the API. The metadata can be used by the clients
|
||||
* if needed, and can be presented in the Swagger-UI for convenience.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#info-object | Swagger 2.0 Specification - info}
|
||||
*/
|
||||
info: Info;
|
||||
|
||||
/**
|
||||
* The host (name or IP) serving the API. This MUST be the host only and does
|
||||
* not include the scheme nor sub-paths. It MAY include a port. If the host
|
||||
* is not included, the host serving the documentation is to be used
|
||||
* (including the port). The host does not support path templating.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - host}
|
||||
*
|
||||
* @example "api.example.com"
|
||||
* @example "api.example.com:8080"
|
||||
*/
|
||||
host?: string;
|
||||
/**
|
||||
* The host (name or IP) serving the API. This MUST be the host only and does
|
||||
* not include the scheme nor sub-paths. It MAY include a port. If the host
|
||||
* is not included, the host serving the documentation is to be used
|
||||
* (including the port). The host does not support path templating.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - host}
|
||||
*
|
||||
* @example "api.example.com"
|
||||
* @example "api.example.com:8080"
|
||||
*/
|
||||
host?: string;
|
||||
|
||||
/**
|
||||
* The base path on which the API is served, which is relative to the host.
|
||||
* If it is not included, the API is served directly under the host.
|
||||
* The value MUST start with a leading slash (/). The basePath does not
|
||||
* support path templating.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - basePath}
|
||||
*
|
||||
* @example "/v1"
|
||||
* @example "/api/v2"
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* The base path on which the API is served, which is relative to the host.
|
||||
* If it is not included, the API is served directly under the host.
|
||||
* The value MUST start with a leading slash (/). The basePath does not
|
||||
* support path templating.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - basePath}
|
||||
*
|
||||
* @example "/v1"
|
||||
* @example "/api/v2"
|
||||
*/
|
||||
basePath?: string;
|
||||
|
||||
/**
|
||||
* The transfer protocol of the API. Values MUST be from the list:
|
||||
* "http", "https", "ws", "wss". If the schemes is not included, the default
|
||||
* scheme to be used is the one used to access the specification.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - schemes}
|
||||
*
|
||||
* @example ["https", "http"]
|
||||
* @example ["wss"]
|
||||
*/
|
||||
schemes?: Array<"http" | "https" | "ws" | "wss">;
|
||||
/**
|
||||
* The transfer protocol of the API. Values MUST be from the list:
|
||||
* "http", "https", "ws", "wss". If the schemes is not included, the default
|
||||
* scheme to be used is the one used to access the specification.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - schemes}
|
||||
*
|
||||
* @example ["https", "http"]
|
||||
* @example ["wss"]
|
||||
*/
|
||||
schemes?: Array<"http" | "https" | "ws" | "wss">;
|
||||
|
||||
/**
|
||||
* A list of MIME types the APIs can consume. This is global to all APIs
|
||||
* but can be overridden on specific API calls. Value MUST be as described
|
||||
* under Mime Types.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - consumes}
|
||||
*
|
||||
* @example ["application/json"]
|
||||
* @example ["application/xml", "application/json"]
|
||||
*/
|
||||
consumes?: string[];
|
||||
/**
|
||||
* A list of MIME types the APIs can consume. This is global to all APIs
|
||||
* but can be overridden on specific API calls. Value MUST be as described
|
||||
* under Mime Types.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - consumes}
|
||||
*
|
||||
* @example ["application/json"]
|
||||
* @example ["application/xml", "application/json"]
|
||||
*/
|
||||
consumes?: string[];
|
||||
|
||||
/**
|
||||
* A list of MIME types the APIs can produce. This is global to all APIs
|
||||
* but can be overridden on specific API calls. Value MUST be as described
|
||||
* under Mime Types.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - produces}
|
||||
*
|
||||
* @example ["application/json"]
|
||||
* @example ["application/xml", "application/json"]
|
||||
*/
|
||||
produces?: string[];
|
||||
/**
|
||||
* A list of MIME types the APIs can produce. This is global to all APIs
|
||||
* but can be overridden on specific API calls. Value MUST be as described
|
||||
* under Mime Types.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#swagger-object | Swagger 2.0 Specification - produces}
|
||||
*
|
||||
* @example ["application/json"]
|
||||
* @example ["application/xml", "application/json"]
|
||||
*/
|
||||
produces?: string[];
|
||||
|
||||
/**
|
||||
* The available paths and operations for the API. This is the root of the
|
||||
* Path Item Object. It does not define a path or a basePath, they are defined
|
||||
* in the Paths Object. A relative path to an individual endpoint. The field
|
||||
* name MUST begin with a slash. The path is appended to the basePath in order
|
||||
* to construct the full URL. Path templating is allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#paths-object | Swagger 2.0 Specification - paths}
|
||||
*
|
||||
* @example { "/users": { get: { ... } } }
|
||||
* @example { "/users/{id}": { get: { ... } } }
|
||||
*/
|
||||
paths: Paths;
|
||||
/**
|
||||
* The available paths and operations for the API. This is the root of the
|
||||
* Path Item Object. It does not define a path or a basePath, they are defined
|
||||
* in the Paths Object. A relative path to an individual endpoint. The field
|
||||
* name MUST begin with a slash. The path is appended to the basePath in order
|
||||
* to construct the full URL. Path templating is allowed.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#paths-object | Swagger 2.0 Specification - paths}
|
||||
*
|
||||
* @example { "/users": { get: { ... } } }
|
||||
* @example { "/users/{id}": { get: { ... } } }
|
||||
*/
|
||||
paths: Paths;
|
||||
|
||||
/**
|
||||
* An object to hold data types produced and consumed by operations.
|
||||
* These data types can be primitives, arrays or models.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#definitions-object | Swagger 2.0 Specification - definitions}
|
||||
*
|
||||
* @example { "User": { type: "object", properties: { ... } } }
|
||||
*/
|
||||
definitions?: Definitions;
|
||||
/**
|
||||
* An object to hold data types produced and consumed by operations.
|
||||
* These data types can be primitives, arrays or models.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#definitions-object | Swagger 2.0 Specification - definitions}
|
||||
*
|
||||
* @example { "User": { type: "object", properties: { ... } } }
|
||||
*/
|
||||
definitions?: Definitions;
|
||||
|
||||
/**
|
||||
* An object to hold parameters that can be used across operations.
|
||||
* This property does not define global parameters for all operations.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#parameters-definitions-object | Swagger 2.0 Specification - parameters}
|
||||
*
|
||||
* @example { "pageParam": { name: "page", in: "query", type: "integer" } }
|
||||
*/
|
||||
parameters?: ParametersDefinitions;
|
||||
/**
|
||||
* An object to hold parameters that can be used across operations.
|
||||
* This property does not define global parameters for all operations.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#parameters-definitions-object | Swagger 2.0 Specification - parameters}
|
||||
*
|
||||
* @example { "pageParam": { name: "page", in: "query", type: "integer" } }
|
||||
*/
|
||||
parameters?: ParametersDefinitions;
|
||||
|
||||
/**
|
||||
* An object to hold responses that can be used across operations.
|
||||
* This property does not define global responses for all operations.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#responses-definitions-object | Swagger 2.0 Specification - responses}
|
||||
*
|
||||
* @example { "NotFound": { description: "Entity not found" } }
|
||||
*/
|
||||
responses?: ResponsesDefinitions;
|
||||
/**
|
||||
* An object to hold responses that can be used across operations.
|
||||
* This property does not define global responses for all operations.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#responses-definitions-object | Swagger 2.0 Specification - responses}
|
||||
*
|
||||
* @example { "NotFound": { description: "Entity not found" } }
|
||||
*/
|
||||
responses?: ResponsesDefinitions;
|
||||
|
||||
/**
|
||||
* Security scheme definitions that can be used by the operations.
|
||||
* Supported schemes are basic authentication, an API key (either as a header
|
||||
* or as a query parameter) and OAuth2's common flows (implicit, password,
|
||||
* application and access code).
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-definitions-object | Swagger 2.0 Specification - securityDefinitions}
|
||||
*
|
||||
* @example { "api_key": { type: "apiKey", in: "header", name: "X-API-Key" } }
|
||||
*/
|
||||
securityDefinitions?: SecurityDefinitions;
|
||||
/**
|
||||
* Security scheme definitions that can be used by the operations.
|
||||
* Supported schemes are basic authentication, an API key (either as a header
|
||||
* or as a query parameter) and OAuth2's common flows (implicit, password,
|
||||
* application and access code).
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-definitions-object | Swagger 2.0 Specification - securityDefinitions}
|
||||
*
|
||||
* @example { "api_key": { type: "apiKey", in: "header", name: "X-API-Key" } }
|
||||
*/
|
||||
securityDefinitions?: SecurityDefinitions;
|
||||
|
||||
/**
|
||||
* A declaration of which security schemes are applied for the API as a whole.
|
||||
* The list of values describes alternative security schemes that can be used
|
||||
* (that is, there is a logical OR between the security requirements).
|
||||
* Individual operations can override this definition.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-requirement-object | Swagger 2.0 Specification - security}
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
* @example [{ "oauth2": ["read", "write"] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
/**
|
||||
* A declaration of which security schemes are applied for the API as a whole.
|
||||
* The list of values describes alternative security schemes that can be used
|
||||
* (that is, there is a logical OR between the security requirements).
|
||||
* Individual operations can override this definition.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#security-requirement-object | Swagger 2.0 Specification - security}
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
* @example [{ "oauth2": ["read", "write"] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
|
||||
/**
|
||||
* A list of tags used by the specification with additional metadata.
|
||||
* The order of the tags can be used to reflect on their order by the
|
||||
* parsing tools. Not all tags that are used by the Operation Object must
|
||||
* be declared. The tags that are not declared may be organized randomly
|
||||
* or based on the tools' logic. Each tag name in the list MUST be unique.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - tags}
|
||||
*
|
||||
* @example [{ name: "users", description: "User management" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
/**
|
||||
* A list of tags used by the specification with additional metadata.
|
||||
* The order of the tags can be used to reflect on their order by the
|
||||
* parsing tools. Not all tags that are used by the Operation Object must
|
||||
* be declared. The tags that are not declared may be organized randomly
|
||||
* or based on the tools' logic. Each tag name in the list MUST be unique.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - tags}
|
||||
*
|
||||
* @example [{ name: "users", description: "User management" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#external-documentation-object | Swagger 2.0 Specification - externalDocs}
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#external-documentation-object | Swagger 2.0 Specification - externalDocs}
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
} & Extension;
|
||||
|
||||
1842
2.0/status.ts
1842
2.0/status.ts
File diff suppressed because it is too large
Load Diff
80
2.0/tags.ts
80
2.0/tags.ts
@@ -88,46 +88,46 @@ import type { ExternalDocumentation } from "./externalDocs";
|
||||
* ```
|
||||
*/
|
||||
export interface Tag extends Extension {
|
||||
/**
|
||||
* The name of the tag. This field is required and MUST be unique.
|
||||
*
|
||||
* The tag name is used to reference this tag in Operation objects and
|
||||
* must be unique within the entire specification. It should be descriptive
|
||||
* and follow a consistent naming convention.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
* @example "reports"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the tag. This field is required and MUST be unique.
|
||||
*
|
||||
* The tag name is used to reference this tag in Operation objects and
|
||||
* must be unique within the entire specification. It should be descriptive
|
||||
* and follow a consistent naming convention.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - name}
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
* @example "reports"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A short description for the tag. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description provides context about what operations belong to this tag
|
||||
* and helps developers understand the purpose and scope of the tag.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations including CRUD operations for pets"
|
||||
* @example "Authentication and authorization operations"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for the tag. GFM syntax can be used for rich text representation.
|
||||
*
|
||||
* This description provides context about what operations belong to this tag
|
||||
* and helps developers understand the purpose and scope of the tag.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - description}
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations including CRUD operations for pets"
|
||||
* @example "Authentication and authorization operations"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
*
|
||||
* This allows for more detailed documentation about the tag and its
|
||||
* associated operations to be provided via external resources.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - externalDocs}
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
* @example { description: "Pet management API documentation", url: "https://petstore.example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
*
|
||||
* This allows for more detailed documentation about the tag and its
|
||||
* associated operations to be provided via external resources.
|
||||
*
|
||||
* @see {@link https://swagger.io/specification/v2/#tag-object | Swagger 2.0 Specification - externalDocs}
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
* @example { description: "Pet management API documentation", url: "https://petstore.example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
}
|
||||
|
||||
94
2.0/xml.ts
94
2.0/xml.ts
@@ -88,55 +88,55 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface XMLObject extends Extension {
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* When defined within the Items Object, it will affect the name of the individual
|
||||
* XML elements within the list. When defined alongside type being array (outside
|
||||
* the items), it will affect the wrapping element and only if wrapped is true.
|
||||
*
|
||||
* @example "animal"
|
||||
* @example "item"
|
||||
* @example "person"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* When defined within the Items Object, it will affect the name of the individual
|
||||
* XML elements within the list. When defined alongside type being array (outside
|
||||
* the items), it will affect the wrapping element and only if wrapped is true.
|
||||
*
|
||||
* @example "animal"
|
||||
* @example "item"
|
||||
* @example "person"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URL of the namespace definition. Value SHOULD be in the form of a URL.
|
||||
*
|
||||
* @example "http://example.com/schema/sample"
|
||||
* @example "http://www.w3.org/2001/XMLSchema"
|
||||
* @example "http://swagger.io/schema/sample"
|
||||
*/
|
||||
namespace?: string;
|
||||
/**
|
||||
* The URL of the namespace definition. Value SHOULD be in the form of a URL.
|
||||
*
|
||||
* @example "http://example.com/schema/sample"
|
||||
* @example "http://www.w3.org/2001/XMLSchema"
|
||||
* @example "http://swagger.io/schema/sample"
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* The prefix to be used for the name.
|
||||
*
|
||||
* @example "sample"
|
||||
* @example "xs"
|
||||
* @example "ex"
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* The prefix to be used for the name.
|
||||
*
|
||||
* @example "sample"
|
||||
* @example "xs"
|
||||
* @example "ex"
|
||||
*/
|
||||
prefix?: string;
|
||||
|
||||
/**
|
||||
* Declares whether the property definition translates to an attribute instead of an element.
|
||||
* Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
attribute?: boolean;
|
||||
/**
|
||||
* Declares whether the property definition translates to an attribute instead of an element.
|
||||
* Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
attribute?: boolean;
|
||||
|
||||
/**
|
||||
* MAY be used only for an array definition. Signifies whether the array is wrapped
|
||||
* (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>).
|
||||
* Default value is false. The definition takes effect only when defined alongside
|
||||
* type being array (outside the items).
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
wrapped?: boolean;
|
||||
/**
|
||||
* MAY be used only for an array definition. Signifies whether the array is wrapped
|
||||
* (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>).
|
||||
* Default value is false. The definition takes effect only when defined alongside
|
||||
* type being array (outside the items).
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
wrapped?: boolean;
|
||||
}
|
||||
|
||||
1267
3.0/3.0.0.md
1267
3.0/3.0.0.md
File diff suppressed because it is too large
Load Diff
1214
3.0/3.0.1.md
1214
3.0/3.0.1.md
File diff suppressed because it is too large
Load Diff
1293
3.0/3.0.2.md
1293
3.0/3.0.2.md
File diff suppressed because it is too large
Load Diff
1284
3.0/3.0.3.md
1284
3.0/3.0.3.md
File diff suppressed because it is too large
Load Diff
884
3.0/3.0.4.md
884
3.0/3.0.4.md
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,5 @@
|
||||
import type { Extension } from "./extensions";
|
||||
import type {
|
||||
Callback,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
Parameter,
|
||||
RequestBody,
|
||||
Response,
|
||||
} from "./paths";
|
||||
import type { Callback, Example, Header, Link, Parameter, RequestBody, Response } from "./paths";
|
||||
import type { Reference } from "./references";
|
||||
import type { Schema } from "./schema";
|
||||
import type { SecurityScheme } from "./security";
|
||||
@@ -68,147 +60,147 @@ import type { SecurityScheme } from "./security";
|
||||
* ```
|
||||
*/
|
||||
export interface Components extends Extension {
|
||||
/**
|
||||
* An object to hold reusable Schema Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - schemas} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - schemas} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - schemas} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - schemas} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - schemas} |
|
||||
* @property `schemas` - Optional An object to hold reusable Schema Objects
|
||||
*
|
||||
* @example { "User": { type: "object", properties: { id: { type: "integer" } } } }
|
||||
*/
|
||||
schemas?: Record<string, Schema | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Schema Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - schemas} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - schemas} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - schemas} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - schemas} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - schemas} |
|
||||
* @property `schemas` - Optional An object to hold reusable Schema Objects
|
||||
*
|
||||
* @example { "User": { type: "object", properties: { id: { type: "integer" } } } }
|
||||
*/
|
||||
schemas?: Record<string, Schema | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Response Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - responses} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - responses} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - responses} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - responses} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - responses} |
|
||||
* @property `responses` - Optional An object to hold reusable Response Objects
|
||||
*
|
||||
* @example { "NotFound": { description: "Resource not found" } }
|
||||
*/
|
||||
responses?: Record<string, Response | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Response Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - responses} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - responses} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - responses} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - responses} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - responses} |
|
||||
* @property `responses` - Optional An object to hold reusable Response Objects
|
||||
*
|
||||
* @example { "NotFound": { description: "Resource not found" } }
|
||||
*/
|
||||
responses?: Record<string, Response | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Parameter Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - parameters} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - parameters} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - parameters} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - parameters} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - parameters} |
|
||||
* @property `parameters` - Optional An object to hold reusable Parameter Objects
|
||||
*
|
||||
* @example { "LimitParam": { name: "limit", in: "query", schema: { type: "integer" } } }
|
||||
*/
|
||||
parameters?: Record<string, Parameter | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Parameter Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - parameters} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - parameters} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - parameters} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - parameters} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - parameters} |
|
||||
* @property `parameters` - Optional An object to hold reusable Parameter Objects
|
||||
*
|
||||
* @example { "LimitParam": { name: "limit", in: "query", schema: { type: "integer" } } }
|
||||
*/
|
||||
parameters?: Record<string, Parameter | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Example Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - examples} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - examples} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - examples} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - examples} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - examples} |
|
||||
* @property `examples` - Optional An object to hold reusable Example Objects
|
||||
*
|
||||
* @example { "UserExample": { summary: "A user example", value: { id: 1, name: "John" } } }
|
||||
*/
|
||||
examples?: Record<string, Example | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Example Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - examples} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - examples} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - examples} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - examples} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - examples} |
|
||||
* @property `examples` - Optional An object to hold reusable Example Objects
|
||||
*
|
||||
* @example { "UserExample": { summary: "A user example", value: { id: 1, name: "John" } } }
|
||||
*/
|
||||
examples?: Record<string, Example | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Request Body Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - requestBodies} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - requestBodies} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - requestBodies} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - requestBodies} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - requestBodies} |
|
||||
* @property `requestBodies` - Optional An object to hold reusable Request Body Objects
|
||||
*
|
||||
* @example { "UserRequest": { description: "User data", content: { "application/json": { schema: { $ref: "#/components/schemas/User" } } } } }
|
||||
*/
|
||||
requestBodies?: Record<string, RequestBody | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Request Body Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - requestBodies} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - requestBodies} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - requestBodies} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - requestBodies} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - requestBodies} |
|
||||
* @property `requestBodies` - Optional An object to hold reusable Request Body Objects
|
||||
*
|
||||
* @example { "UserRequest": { description: "User data", content: { "application/json": { schema: { $ref: "#/components/schemas/User" } } } } }
|
||||
*/
|
||||
requestBodies?: Record<string, RequestBody | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Header Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - headers} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - headers} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - headers} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - headers} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - headers} |
|
||||
* @property `headers` - Optional An object to hold reusable Header Objects
|
||||
*
|
||||
* @example { "RateLimit": { description: "Rate limit header", schema: { type: "integer" } } }
|
||||
*/
|
||||
headers?: Record<string, Header | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Header Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - headers} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - headers} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - headers} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - headers} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - headers} |
|
||||
* @property `headers` - Optional An object to hold reusable Header Objects
|
||||
*
|
||||
* @example { "RateLimit": { description: "Rate limit header", schema: { type: "integer" } } }
|
||||
*/
|
||||
headers?: Record<string, Header | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Security Scheme Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - securitySchemes} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - securitySchemes} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - securitySchemes} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - securitySchemes} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - securitySchemes} |
|
||||
* @property `securitySchemes` - Optional An object to hold reusable Security Scheme Objects
|
||||
*
|
||||
* @example { "ApiKeyAuth": { type: "apiKey", in: "header", name: "X-API-Key" } }
|
||||
*/
|
||||
securitySchemes?: Record<string, SecurityScheme | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Security Scheme Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - securitySchemes} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - securitySchemes} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - securitySchemes} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - securitySchemes} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - securitySchemes} |
|
||||
* @property `securitySchemes` - Optional An object to hold reusable Security Scheme Objects
|
||||
*
|
||||
* @example { "ApiKeyAuth": { type: "apiKey", in: "header", name: "X-API-Key" } }
|
||||
*/
|
||||
securitySchemes?: Record<string, SecurityScheme | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Link Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - links} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - links} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - links} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - links} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - links} |
|
||||
* @property `links` - Optional An object to hold reusable Link Objects
|
||||
*
|
||||
* @example { "UserRepositories": { operationId: "getUserRepositories", parameters: { username: "$response.body#/username" } } }
|
||||
*/
|
||||
links?: Record<string, Link | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Link Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - links} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - links} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - links} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - links} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - links} |
|
||||
* @property `links` - Optional An object to hold reusable Link Objects
|
||||
*
|
||||
* @example { "UserRepositories": { operationId: "getUserRepositories", parameters: { username: "$response.body#/username" } } }
|
||||
*/
|
||||
links?: Record<string, Link | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Callback Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - callbacks} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - callbacks} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - callbacks} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - callbacks} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - callbacks} |
|
||||
* @property `callbacks` - Optional An object to hold reusable Callback Objects
|
||||
*
|
||||
* @example { "MyCallback": { "{$request.body#/callbackUrl}": { post: { requestBody: { $ref: "#/components/requestBodies/SomeRequestBody" } } } } }
|
||||
*/
|
||||
callbacks?: Record<string, Callback | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Callback Objects.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#components-object | OpenAPI 3.0.4 Components Object - callbacks} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#components-object | OpenAPI 3.0.3 Components Object - callbacks} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#components-object | OpenAPI 3.0.2 Components Object - callbacks} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#components-object | OpenAPI 3.0.1 Components Object - callbacks} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#components-object | OpenAPI 3.0.0 Components Object - callbacks} |
|
||||
* @property `callbacks` - Optional An object to hold reusable Callback Objects
|
||||
*
|
||||
* @example { "MyCallback": { "{$request.body#/callbackUrl}": { post: { requestBody: { $ref: "#/components/requestBodies/SomeRequestBody" } } } } }
|
||||
*/
|
||||
callbacks?: Record<string, Callback | Reference>;
|
||||
}
|
||||
|
||||
@@ -89,121 +89,121 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ArraySchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "array" for array schemas.
|
||||
*
|
||||
* @example "array"
|
||||
*/
|
||||
type: "array";
|
||||
/**
|
||||
* The type of the schema. Must be "array" for array schemas.
|
||||
*
|
||||
* @example "array"
|
||||
*/
|
||||
type: "array";
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Tags"
|
||||
* @example "User List"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Tags"
|
||||
* @example "User List"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Array of tag strings"
|
||||
* @example "List of user objects"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Array of tag strings"
|
||||
* @example "List of user objects"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example ["tag1", "tag2"]
|
||||
* @example []
|
||||
*/
|
||||
default?: unknown[];
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example ["tag1", "tag2"]
|
||||
* @example []
|
||||
*/
|
||||
default?: unknown[];
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example ["example1", "example2"]
|
||||
* @example [1, 2, 3]
|
||||
*/
|
||||
example?: unknown[];
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example ["example1", "example2"]
|
||||
* @example [1, 2, 3]
|
||||
*/
|
||||
example?: unknown[];
|
||||
|
||||
/**
|
||||
* Enumeration of valid array values.
|
||||
*
|
||||
* @example [["a", "b"], ["c", "d"]]
|
||||
* @example [[1, 2], [3, 4]]
|
||||
*/
|
||||
enum?: unknown[][];
|
||||
/**
|
||||
* Enumeration of valid array values.
|
||||
*
|
||||
* @example [["a", "b"], ["c", "d"]]
|
||||
* @example [[1, 2], [3, 4]]
|
||||
*/
|
||||
enum?: unknown[][];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "tags", wrapped: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "tags", wrapped: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
// Array-specific validation constraints
|
||||
/**
|
||||
* Schema for the items in the array. This field is required for array schemas.
|
||||
*
|
||||
* @example { type: "string" }
|
||||
* @example { $ref: "#/components/schemas/User" }
|
||||
*/
|
||||
items?: Schema;
|
||||
// Array-specific validation constraints
|
||||
/**
|
||||
* Schema for the items in the array. This field is required for array schemas.
|
||||
*
|
||||
* @example { type: "string" }
|
||||
* @example { $ref: "#/components/schemas/User" }
|
||||
*/
|
||||
items?: Schema;
|
||||
|
||||
/**
|
||||
* Maximum number of items in the array. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 10
|
||||
* @example 100
|
||||
*/
|
||||
maxItems?: number;
|
||||
/**
|
||||
* Maximum number of items in the array. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 10
|
||||
* @example 100
|
||||
*/
|
||||
maxItems?: number;
|
||||
|
||||
/**
|
||||
* Minimum number of items in the array. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 1
|
||||
* @example 0
|
||||
*/
|
||||
minItems?: number;
|
||||
/**
|
||||
* Minimum number of items in the array. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 1
|
||||
* @example 0
|
||||
*/
|
||||
minItems?: number;
|
||||
|
||||
/**
|
||||
* Whether all items in the array must be unique. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
/**
|
||||
* Whether all items in the array must be unique. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
}
|
||||
|
||||
@@ -81,87 +81,87 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface BooleanSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "boolean" for boolean schemas.
|
||||
*
|
||||
* @example "boolean"
|
||||
*/
|
||||
type: "boolean";
|
||||
/**
|
||||
* The type of the schema. Must be "boolean" for boolean schemas.
|
||||
*
|
||||
* @example "boolean"
|
||||
*/
|
||||
type: "boolean";
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Is Active"
|
||||
* @example "Enabled"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Is Active"
|
||||
* @example "Enabled"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Whether the user is active"
|
||||
* @example "Feature enabled status"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Whether the user is active"
|
||||
* @example "Feature enabled status"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
default?: boolean;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
default?: boolean;
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
example?: boolean;
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
example?: boolean;
|
||||
|
||||
/**
|
||||
* Enumeration of valid boolean values.
|
||||
*
|
||||
* @example [true, false]
|
||||
*/
|
||||
enum?: boolean[];
|
||||
/**
|
||||
* Enumeration of valid boolean values.
|
||||
*
|
||||
* @example [true, false]
|
||||
*/
|
||||
enum?: boolean[];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "isActive", attribute: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "isActive", attribute: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
}
|
||||
|
||||
@@ -92,119 +92,119 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface CompositionSchema extends Extension {
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Composed User"
|
||||
* @example "Flexible Value"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Composed User"
|
||||
* @example "Flexible Value"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Schema composed from multiple base schemas"
|
||||
* @example "Value that can be string or number"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Schema composed from multiple base schemas"
|
||||
* @example "Value that can be string or number"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example "default value"
|
||||
* @example { name: "default" }
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example "default value"
|
||||
* @example { name: "default" }
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example "example value"
|
||||
* @example { name: "example" }
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example "example value"
|
||||
* @example { name: "example" }
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* Enumeration of valid values.
|
||||
*
|
||||
* @example ["value1", "value2"]
|
||||
* @example [1, 2, 3]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* Enumeration of valid values.
|
||||
*
|
||||
* @example ["value1", "value2"]
|
||||
* @example [1, 2, 3]
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "composed", wrapped: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "composed", wrapped: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this schema", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this schema", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
/**
|
||||
* Discriminator for polymorphism. The property name used to differentiate between schemas.
|
||||
*
|
||||
* @example "petType"
|
||||
* @example "type"
|
||||
*/
|
||||
discriminator?: Discriminator;
|
||||
/**
|
||||
* Discriminator for polymorphism. The property name used to differentiate between schemas.
|
||||
*
|
||||
* @example "petType"
|
||||
* @example "type"
|
||||
*/
|
||||
discriminator?: Discriminator;
|
||||
|
||||
// Composition keywords (mutually exclusive)
|
||||
/**
|
||||
* Array of schemas that must all be valid for the instance to be valid.
|
||||
*
|
||||
* @example [{ $ref: "#/components/schemas/Base" }, { type: "object", required: ["id"] }]
|
||||
*/
|
||||
allOf?: Schema[];
|
||||
// Composition keywords (mutually exclusive)
|
||||
/**
|
||||
* Array of schemas that must all be valid for the instance to be valid.
|
||||
*
|
||||
* @example [{ $ref: "#/components/schemas/Base" }, { type: "object", required: ["id"] }]
|
||||
*/
|
||||
allOf?: Schema[];
|
||||
|
||||
/**
|
||||
* Array of schemas where at least one must be valid for the instance to be valid.
|
||||
*
|
||||
* @example [{ type: "string" }, { type: "integer" }]
|
||||
*/
|
||||
anyOf?: Schema[];
|
||||
/**
|
||||
* Array of schemas where at least one must be valid for the instance to be valid.
|
||||
*
|
||||
* @example [{ type: "string" }, { type: "integer" }]
|
||||
*/
|
||||
anyOf?: Schema[];
|
||||
|
||||
/**
|
||||
* Array of schemas where exactly one must be valid for the instance to be valid.
|
||||
*
|
||||
* @example [{ $ref: "#/components/schemas/Dog" }, { $ref: "#/components/schemas/Cat" }]
|
||||
*/
|
||||
oneOf?: Schema[];
|
||||
/**
|
||||
* Array of schemas where exactly one must be valid for the instance to be valid.
|
||||
*
|
||||
* @example [{ $ref: "#/components/schemas/Dog" }, { $ref: "#/components/schemas/Cat" }]
|
||||
*/
|
||||
oneOf?: Schema[];
|
||||
|
||||
/**
|
||||
* Schema that must not be valid for the instance to be valid.
|
||||
*
|
||||
* @example { type: "null" }
|
||||
* @example { type: "string", maxLength: 0 }
|
||||
*/
|
||||
not?: Schema;
|
||||
/**
|
||||
* Schema that must not be valid for the instance to be valid.
|
||||
*
|
||||
* @example { type: "null" }
|
||||
* @example { type: "string", maxLength: 0 }
|
||||
*/
|
||||
not?: Schema;
|
||||
}
|
||||
|
||||
@@ -87,139 +87,139 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface IntegerSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "integer" for integer schemas.
|
||||
*
|
||||
* @example "integer"
|
||||
*/
|
||||
type: "integer";
|
||||
/**
|
||||
* The type of the schema. Must be "integer" for integer schemas.
|
||||
*
|
||||
* @example "integer"
|
||||
*/
|
||||
type: "integer";
|
||||
|
||||
/**
|
||||
* The extending format for the integer type. See OpenAPI 3.0.x Data Type Formats for details.
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "int64"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the integer type. See OpenAPI 3.0.x Data Type Formats for details.
|
||||
*
|
||||
* @example "int32"
|
||||
* @example "int64"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "User ID"
|
||||
* @example "Age"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "User ID"
|
||||
* @example "Age"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "The user's unique identifier"
|
||||
* @example "Age in years"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "The user's unique identifier"
|
||||
* @example "Age in years"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example 0
|
||||
* @example 1
|
||||
*/
|
||||
default?: number;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example 0
|
||||
* @example 1
|
||||
*/
|
||||
default?: number;
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example 42
|
||||
* @example 100
|
||||
*/
|
||||
example?: number;
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example 42
|
||||
* @example 100
|
||||
*/
|
||||
example?: number;
|
||||
|
||||
/**
|
||||
* Enumeration of valid integer values.
|
||||
*
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
* @example [0, 1, 2]
|
||||
*/
|
||||
enum?: number[];
|
||||
/**
|
||||
* Enumeration of valid integer values.
|
||||
*
|
||||
* @example [1, 2, 3, 4, 5]
|
||||
* @example [0, 1, 2]
|
||||
*/
|
||||
enum?: number[];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "userId", attribute: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "userId", attribute: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
// Integer-specific validation constraints
|
||||
/**
|
||||
* A number is valid against "multipleOf" if the result of the division
|
||||
* of the instance by this keyword's value is an integer.
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
* @example 5
|
||||
*/
|
||||
multipleOf?: number;
|
||||
// Integer-specific validation constraints
|
||||
/**
|
||||
* A number is valid against "multipleOf" if the result of the division
|
||||
* of the instance by this keyword's value is an integer.
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
* @example 5
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "maximum" if it is less than or equal to this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 2147483647
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* A number is valid against "maximum" if it is less than or equal to this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 2147483647
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "exclusiveMaximum" if it is strictly less than this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 1000
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
/**
|
||||
* A number is valid against "exclusiveMaximum" if it is strictly less than this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 1000
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "minimum" if it is greater than or equal to this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example 1
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* A number is valid against "minimum" if it is greater than or equal to this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example 1
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "exclusiveMinimum" if it is strictly greater than this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example -1
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
/**
|
||||
* A number is valid against "exclusiveMinimum" if it is strictly greater than this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example -1
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
}
|
||||
|
||||
@@ -89,139 +89,139 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface NumberSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "number" for number schemas.
|
||||
*
|
||||
* @example "number"
|
||||
*/
|
||||
type: "number";
|
||||
/**
|
||||
* The type of the schema. Must be "number" for number schemas.
|
||||
*
|
||||
* @example "number"
|
||||
*/
|
||||
type: "number";
|
||||
|
||||
/**
|
||||
* The extending format for the number type. See OpenAPI 3.0.x Data Type Formats for details.
|
||||
*
|
||||
* @example "float"
|
||||
* @example "double"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the number type. See OpenAPI 3.0.x Data Type Formats for details.
|
||||
*
|
||||
* @example "float"
|
||||
* @example "double"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Price"
|
||||
* @example "Temperature"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Price"
|
||||
* @example "Temperature"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "The price in dollars"
|
||||
* @example "Temperature in Celsius"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "The price in dollars"
|
||||
* @example "Temperature in Celsius"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example 0
|
||||
* @example 25.5
|
||||
*/
|
||||
default?: number;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example 0
|
||||
* @example 25.5
|
||||
*/
|
||||
default?: number;
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example 19.99
|
||||
* @example 98.6
|
||||
*/
|
||||
example?: number;
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example 19.99
|
||||
* @example 98.6
|
||||
*/
|
||||
example?: number;
|
||||
|
||||
/**
|
||||
* Enumeration of valid number values.
|
||||
*
|
||||
* @example [1.0, 2.0, 3.0, 4.0, 5.0]
|
||||
* @example [0.0, 0.5, 1.0]
|
||||
*/
|
||||
enum?: number[];
|
||||
/**
|
||||
* Enumeration of valid number values.
|
||||
*
|
||||
* @example [1.0, 2.0, 3.0, 4.0, 5.0]
|
||||
* @example [0.0, 0.5, 1.0]
|
||||
*/
|
||||
enum?: number[];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "price", attribute: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "price", attribute: true }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
// Number-specific validation constraints
|
||||
/**
|
||||
* A number is valid against "multipleOf" if the result of the division
|
||||
* of the instance by this keyword's value is an integer.
|
||||
*
|
||||
* @example 0.01
|
||||
* @example 0.1
|
||||
* @example 2
|
||||
*/
|
||||
multipleOf?: number;
|
||||
// Number-specific validation constraints
|
||||
/**
|
||||
* A number is valid against "multipleOf" if the result of the division
|
||||
* of the instance by this keyword's value is an integer.
|
||||
*
|
||||
* @example 0.01
|
||||
* @example 0.1
|
||||
* @example 2
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "maximum" if it is less than or equal to this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 999.99
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* A number is valid against "maximum" if it is less than or equal to this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 999.99
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "exclusiveMaximum" if it is strictly less than this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 1000
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
/**
|
||||
* A number is valid against "exclusiveMaximum" if it is strictly less than this value.
|
||||
*
|
||||
* @example 100
|
||||
* @example 1000
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "minimum" if it is greater than or equal to this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example -273.15
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* A number is valid against "minimum" if it is greater than or equal to this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example -273.15
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* A number is valid against "exclusiveMinimum" if it is strictly greater than this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example -100
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
/**
|
||||
* A number is valid against "exclusiveMinimum" if it is strictly greater than this value.
|
||||
*
|
||||
* @example 0
|
||||
* @example -100
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
}
|
||||
|
||||
@@ -106,154 +106,154 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ObjectSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "object" for object schemas.
|
||||
*
|
||||
* @example "object"
|
||||
*/
|
||||
type: "object";
|
||||
/**
|
||||
* The type of the schema. Must be "object" for object schemas.
|
||||
*
|
||||
* @example "object"
|
||||
*/
|
||||
type: "object";
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Product"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "User"
|
||||
* @example "Product"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Product information with pricing"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "A user object containing basic information"
|
||||
* @example "Product information with pricing"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example {}
|
||||
*/
|
||||
default?: Record<string, unknown>;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example { name: "John", age: 30 }
|
||||
* @example {}
|
||||
*/
|
||||
default?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example { name: "Jane", age: 25 }
|
||||
* @example { id: 1, title: "Sample" }
|
||||
*/
|
||||
example?: Record<string, unknown>;
|
||||
/**
|
||||
* Example value for the schema.
|
||||
*
|
||||
* @example { name: "Jane", age: 25 }
|
||||
* @example { id: 1, title: "Sample" }
|
||||
*/
|
||||
example?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* Enumeration of valid object values.
|
||||
*
|
||||
* @example [{ name: "John" }, { name: "Jane" }]
|
||||
* @example [{ status: "active" }, { status: "inactive" }]
|
||||
*/
|
||||
enum?: Record<string, unknown>[];
|
||||
/**
|
||||
* Enumeration of valid object values.
|
||||
*
|
||||
* @example [{ name: "John" }, { name: "Jane" }]
|
||||
* @example [{ status: "active" }, { status: "inactive" }]
|
||||
*/
|
||||
enum?: Record<string, unknown>[];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "user", wrapped: false }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
*
|
||||
* @example { name: "user", wrapped: false }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this object", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
*
|
||||
* @example { description: "Find out more about this object", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
/**
|
||||
* Discriminator for polymorphism. The property name used to differentiate between schemas.
|
||||
*
|
||||
* @example "petType"
|
||||
* @example "type"
|
||||
*/
|
||||
discriminator?: Discriminator;
|
||||
/**
|
||||
* Discriminator for polymorphism. The property name used to differentiate between schemas.
|
||||
*
|
||||
* @example "petType"
|
||||
* @example "type"
|
||||
*/
|
||||
discriminator?: Discriminator;
|
||||
|
||||
// Object-specific validation constraints
|
||||
/**
|
||||
* Properties of the object. Each property name maps to a schema definition.
|
||||
*
|
||||
* @example { name: { type: "string" }, age: { type: "integer" } }
|
||||
* @example { id: { $ref: "#/components/schemas/Id" } }
|
||||
*/
|
||||
properties?: Record<string, Schema>;
|
||||
// Object-specific validation constraints
|
||||
/**
|
||||
* Properties of the object. Each property name maps to a schema definition.
|
||||
*
|
||||
* @example { name: { type: "string" }, age: { type: "integer" } }
|
||||
* @example { id: { $ref: "#/components/schemas/Id" } }
|
||||
*/
|
||||
properties?: Record<string, Schema>;
|
||||
|
||||
/**
|
||||
* Array of property names that are required. Properties not listed here are optional.
|
||||
*
|
||||
* @example ["id", "name"]
|
||||
* @example ["email"]
|
||||
*/
|
||||
required?: string[];
|
||||
/**
|
||||
* Array of property names that are required. Properties not listed here are optional.
|
||||
*
|
||||
* @example ["id", "name"]
|
||||
* @example ["email"]
|
||||
*/
|
||||
required?: string[];
|
||||
|
||||
/**
|
||||
* Schema for additional properties not defined in the properties object.
|
||||
* Can be a boolean or a schema.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
* @example { type: "string" }
|
||||
*/
|
||||
additionalProperties?: boolean | Schema;
|
||||
/**
|
||||
* Schema for additional properties not defined in the properties object.
|
||||
* Can be a boolean or a schema.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
* @example { type: "string" }
|
||||
*/
|
||||
additionalProperties?: boolean | Schema;
|
||||
|
||||
/**
|
||||
* Pattern-based properties using regular expressions as keys.
|
||||
*
|
||||
* @example { "^S_": { type: "string" } }
|
||||
* @example { "^[0-9]+$": { type: "integer" } }
|
||||
*/
|
||||
patternProperties?: Record<string, Schema>;
|
||||
/**
|
||||
* Pattern-based properties using regular expressions as keys.
|
||||
*
|
||||
* @example { "^S_": { type: "string" } }
|
||||
* @example { "^[0-9]+$": { type: "integer" } }
|
||||
*/
|
||||
patternProperties?: Record<string, Schema>;
|
||||
|
||||
/**
|
||||
* Schema for property names. If present, property names must conform to this schema.
|
||||
*
|
||||
* @example { type: "string", pattern: "^[a-zA-Z][a-zA-Z0-9]*$" }
|
||||
*/
|
||||
propertyNames?: Schema;
|
||||
/**
|
||||
* Schema for property names. If present, property names must conform to this schema.
|
||||
*
|
||||
* @example { type: "string", pattern: "^[a-zA-Z][a-zA-Z0-9]*$" }
|
||||
*/
|
||||
propertyNames?: Schema;
|
||||
|
||||
/**
|
||||
* Maximum number of properties in the object. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 10
|
||||
* @example 50
|
||||
*/
|
||||
maxProperties?: number;
|
||||
/**
|
||||
* Maximum number of properties in the object. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 10
|
||||
* @example 50
|
||||
*/
|
||||
maxProperties?: number;
|
||||
|
||||
/**
|
||||
* Minimum number of properties in the object. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
*/
|
||||
minProperties?: number;
|
||||
/**
|
||||
* Minimum number of properties in the object. The value MUST be a non-negative integer.
|
||||
*
|
||||
* @example 1
|
||||
* @example 2
|
||||
*/
|
||||
minProperties?: number;
|
||||
}
|
||||
|
||||
@@ -61,20 +61,20 @@ import type { Extension } from "../extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ReferenceSchema extends Extension {
|
||||
/**
|
||||
* The reference string. MUST be a valid JSON Reference.
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "#/components/parameters/LimitParam"
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* The reference string. MUST be a valid JSON Reference.
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "#/components/parameters/LimitParam"
|
||||
*/
|
||||
$ref: string;
|
||||
|
||||
/**
|
||||
* A short description of the referenced schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "A reference to the User schema"
|
||||
* @example "Pet object definition"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the referenced schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "A reference to the User schema"
|
||||
* @example "Pet object definition"
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@@ -87,258 +87,258 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface StringSchema extends Extension {
|
||||
/**
|
||||
* The type of the schema. Must be "string" for string schemas.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - type} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - type} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - type} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - type} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - type} |
|
||||
* @property `type` - Required The type of the schema
|
||||
*
|
||||
* @example "string"
|
||||
*/
|
||||
type: "string";
|
||||
/**
|
||||
* The type of the schema. Must be "string" for string schemas.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - type} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - type} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - type} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - type} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - type} |
|
||||
* @property `type` - Required The type of the schema
|
||||
*
|
||||
* @example "string"
|
||||
*/
|
||||
type: "string";
|
||||
|
||||
/**
|
||||
* The extending format for the string type. See OpenAPI 3.0.x Data Type Formats for details.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - format} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - format} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - format} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - format} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - format} |
|
||||
* @property `format` - Optional The extending format for the string type
|
||||
*
|
||||
* @example "email"
|
||||
* @example "date"
|
||||
* @example "uuid"
|
||||
* @example "uri"
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The extending format for the string type. See OpenAPI 3.0.x Data Type Formats for details.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - format} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - format} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - format} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - format} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - format} |
|
||||
* @property `format` - Optional The extending format for the string type
|
||||
*
|
||||
* @example "email"
|
||||
* @example "date"
|
||||
* @example "uuid"
|
||||
* @example "uri"
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - title} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - title} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - title} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - title} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - title} |
|
||||
* @property `title` - Optional A short title for the schema
|
||||
*
|
||||
* @example "User Name"
|
||||
* @example "Email Address"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - title} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - title} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - title} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - title} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - title} |
|
||||
* @property `title` - Optional A short title for the schema
|
||||
*
|
||||
* @example "User Name"
|
||||
* @example "Email Address"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - description} |
|
||||
* @property `description` - Optional A short description of the schema
|
||||
*
|
||||
* @example "The user's full name"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - description} |
|
||||
* @property `description` - Optional A short description of the schema
|
||||
*
|
||||
* @example "The user's full name"
|
||||
* @example "Email address in RFC 5322 format"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - default} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - default} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - default} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - default} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - default} |
|
||||
* @property `default` - Optional The default value for the schema
|
||||
*
|
||||
* @example "John Doe"
|
||||
* @example "user@example.com"
|
||||
*/
|
||||
default?: string;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - default} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - default} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - default} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - default} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - default} |
|
||||
* @property `default` - Optional The default value for the schema
|
||||
*
|
||||
* @example "John Doe"
|
||||
* @example "user@example.com"
|
||||
*/
|
||||
default?: string;
|
||||
|
||||
/**
|
||||
* Example value for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - example} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - example} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - example} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - example} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - example} |
|
||||
* @property `example` - Optional Example value for the schema
|
||||
*
|
||||
* @example "Jane Smith"
|
||||
* @example "admin@example.com"
|
||||
*/
|
||||
example?: string;
|
||||
/**
|
||||
* Example value for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - example} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - example} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - example} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - example} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - example} |
|
||||
* @property `example` - Optional Example value for the schema
|
||||
*
|
||||
* @example "Jane Smith"
|
||||
* @example "admin@example.com"
|
||||
*/
|
||||
example?: string;
|
||||
|
||||
/**
|
||||
* Enumeration of valid string values.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - enum} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - enum} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - enum} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - enum} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - enum} |
|
||||
* @property `enum` - Optional Enumeration of valid string values
|
||||
*
|
||||
* @example ["active", "inactive", "pending"]
|
||||
* @example ["red", "green", "blue"]
|
||||
*/
|
||||
enum?: string[];
|
||||
/**
|
||||
* Enumeration of valid string values.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - enum} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - enum} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - enum} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - enum} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - enum} |
|
||||
* @property `enum` - Optional Enumeration of valid string values
|
||||
*
|
||||
* @example ["active", "inactive", "pending"]
|
||||
* @example ["red", "green", "blue"]
|
||||
*/
|
||||
enum?: string[];
|
||||
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - readOnly} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - readOnly} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - readOnly} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - readOnly} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - readOnly} |
|
||||
* @property `readOnly` - Optional Whether the property is read-only
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is read-only. Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - readOnly} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - readOnly} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - readOnly} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - readOnly} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - readOnly} |
|
||||
* @property `readOnly` - Optional Whether the property is read-only
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
readOnly?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - writeOnly} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - writeOnly} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - writeOnly} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - writeOnly} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - writeOnly} |
|
||||
* @property `writeOnly` - Optional Whether the property is write-only
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
/**
|
||||
* Whether the property is write-only. Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - writeOnly} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - writeOnly} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - writeOnly} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - writeOnly} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - writeOnly} |
|
||||
* @property `writeOnly` - Optional Whether the property is write-only
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
writeOnly?: boolean;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - xml} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - xml} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - xml} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - xml} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - xml} |
|
||||
* @property `xml` - Optional XML representation metadata for the schema
|
||||
*
|
||||
* @example { name: "userName", attribute: false }
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - xml} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - xml} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - xml} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - xml} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - xml} |
|
||||
* @property `xml` - Optional XML representation metadata for the schema
|
||||
*
|
||||
* @example { name: "userName", attribute: false }
|
||||
*/
|
||||
xml?: XML;
|
||||
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - externalDocs} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - externalDocs} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - externalDocs} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - externalDocs} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - externalDocs} |
|
||||
* @property `externalDocs` - Optional Additional external documentation for the schema
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for the schema.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - externalDocs} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - externalDocs} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - externalDocs} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - externalDocs} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - externalDocs} |
|
||||
* @property `externalDocs` - Optional Additional external documentation for the schema
|
||||
*
|
||||
* @example { description: "Find out more about this field", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - deprecated} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - deprecated} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - deprecated} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - deprecated} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - deprecated} |
|
||||
* @property `deprecated` - Optional Whether the schema is deprecated
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Whether the schema is deprecated. Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - deprecated} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - deprecated} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - deprecated} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - deprecated} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - deprecated} |
|
||||
* @property `deprecated` - Optional Whether the schema is deprecated
|
||||
*
|
||||
* @default false
|
||||
* @example true
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
// String-specific validation constraints
|
||||
/**
|
||||
* Maximum length of the string. The value MUST be a non-negative integer.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - maxLength} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - maxLength} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - maxLength} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - maxLength} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - maxLength} |
|
||||
* @property `maxLength` - Optional Maximum length of the string
|
||||
*
|
||||
* @example 100
|
||||
* @example 255
|
||||
*/
|
||||
maxLength?: number;
|
||||
// String-specific validation constraints
|
||||
/**
|
||||
* Maximum length of the string. The value MUST be a non-negative integer.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - maxLength} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - maxLength} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - maxLength} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - maxLength} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - maxLength} |
|
||||
* @property `maxLength` - Optional Maximum length of the string
|
||||
*
|
||||
* @example 100
|
||||
* @example 255
|
||||
*/
|
||||
maxLength?: number;
|
||||
|
||||
/**
|
||||
* Minimum length of the string. The value MUST be a non-negative integer.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - minLength} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - minLength} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - minLength} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - minLength} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - minLength} |
|
||||
* @property `minLength` - Optional Minimum length of the string
|
||||
*
|
||||
* @example 1
|
||||
* @example 8
|
||||
*/
|
||||
minLength?: number;
|
||||
/**
|
||||
* Minimum length of the string. The value MUST be a non-negative integer.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - minLength} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - minLength} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - minLength} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - minLength} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - minLength} |
|
||||
* @property `minLength` - Optional Minimum length of the string
|
||||
*
|
||||
* @example 1
|
||||
* @example 8
|
||||
*/
|
||||
minLength?: number;
|
||||
|
||||
/**
|
||||
* Regular expression pattern the string must match. The pattern MUST be a valid regular expression.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - pattern} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - pattern} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - pattern} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - pattern} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - pattern} |
|
||||
* @property `pattern` - Optional Regular expression pattern the string must match
|
||||
*
|
||||
* @example "^[a-zA-Z0-9]+$"
|
||||
* @example "^\\d{4}-\\d{2}-\\d{2}$"
|
||||
*/
|
||||
pattern?: string;
|
||||
/**
|
||||
* Regular expression pattern the string must match. The pattern MUST be a valid regular expression.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#schema-object | OpenAPI 3.0.4 Schema Object - pattern} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#schema-object | OpenAPI 3.0.3 Schema Object - pattern} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#schema-object | OpenAPI 3.0.2 Schema Object - pattern} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#schema-object | OpenAPI 3.0.1 Schema Object - pattern} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#schema-object | OpenAPI 3.0.0 Schema Object - pattern} |
|
||||
* @property `pattern` - Optional Regular expression pattern the string must match
|
||||
*
|
||||
* @example "^[a-zA-Z0-9]+$"
|
||||
* @example "^\\d{4}-\\d{2}-\\d{2}$"
|
||||
*/
|
||||
pattern?: string;
|
||||
}
|
||||
|
||||
@@ -43,5 +43,5 @@
|
||||
* ```
|
||||
*/
|
||||
export type Extension = {
|
||||
[K in `x-${string}`]: unknown;
|
||||
[K in `x-${string}`]: unknown;
|
||||
};
|
||||
|
||||
@@ -39,37 +39,37 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ExternalDocumentation extends Extension {
|
||||
/**
|
||||
* A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#external-documentation-object | OpenAPI 3.0.4 External Documentation Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#external-documentation-object | OpenAPI 3.0.3 External Documentation Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#external-documentation-object | OpenAPI 3.0.2 External Documentation Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#external-documentation-object | OpenAPI 3.0.1 External Documentation Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#external-documentation-object | OpenAPI 3.0.0 External Documentation Object - description} |
|
||||
* @property `description` - Optional A short description of the target documentation
|
||||
*
|
||||
* @example "Find more info here"
|
||||
* @example "Additional documentation for this API"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#external-documentation-object | OpenAPI 3.0.4 External Documentation Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#external-documentation-object | OpenAPI 3.0.3 External Documentation Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#external-documentation-object | OpenAPI 3.0.2 External Documentation Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#external-documentation-object | OpenAPI 3.0.1 External Documentation Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#external-documentation-object | OpenAPI 3.0.0 External Documentation Object - description} |
|
||||
* @property `description` - Optional A short description of the target documentation
|
||||
*
|
||||
* @example "Find more info here"
|
||||
* @example "Additional documentation for this API"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The URL for the target documentation. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#external-documentation-object | OpenAPI 3.0.4 External Documentation Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#external-documentation-object | OpenAPI 3.0.3 External Documentation Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#external-documentation-object | OpenAPI 3.0.2 External Documentation Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#external-documentation-object | OpenAPI 3.0.1 External Documentation Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#external-documentation-object | OpenAPI 3.0.0 External Documentation Object - url} |
|
||||
* @property `url` - Required The URL for the target documentation
|
||||
*
|
||||
* @example "https://example.com/docs"
|
||||
* @example "https://api.example.com/documentation"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The URL for the target documentation. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#external-documentation-object | OpenAPI 3.0.4 External Documentation Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#external-documentation-object | OpenAPI 3.0.3 External Documentation Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#external-documentation-object | OpenAPI 3.0.2 External Documentation Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#external-documentation-object | OpenAPI 3.0.1 External Documentation Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#external-documentation-object | OpenAPI 3.0.0 External Documentation Object - url} |
|
||||
* @property `url` - Required The URL for the target documentation
|
||||
*
|
||||
* @example "https://example.com/docs"
|
||||
* @example "https://api.example.com/documentation"
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
72
3.0/index.ts
72
3.0/index.ts
@@ -2,64 +2,64 @@
|
||||
// This file serves as the main entry point for all OpenAPI 3.0 type definitions
|
||||
|
||||
export type {
|
||||
// Components types
|
||||
Components,
|
||||
// Components types
|
||||
Components,
|
||||
} from "./components";
|
||||
|
||||
// Re-export all types for convenience
|
||||
export type {
|
||||
// Core types
|
||||
Extension,
|
||||
// Core types
|
||||
Extension,
|
||||
} from "./extensions";
|
||||
export type { ExternalDocumentation } from "./externalDocs";
|
||||
export type {
|
||||
Contact,
|
||||
// Info types
|
||||
Info,
|
||||
License,
|
||||
Contact,
|
||||
// Info types
|
||||
Info,
|
||||
License,
|
||||
} from "./info";
|
||||
|
||||
export type {
|
||||
Callback,
|
||||
Encoding,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
MediaType,
|
||||
Operation,
|
||||
Parameter,
|
||||
PathItem,
|
||||
// Path types
|
||||
Paths,
|
||||
RequestBody,
|
||||
Response,
|
||||
Callback,
|
||||
Encoding,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
MediaType,
|
||||
Operation,
|
||||
Parameter,
|
||||
PathItem,
|
||||
// Path types
|
||||
Paths,
|
||||
RequestBody,
|
||||
Response,
|
||||
} from "./paths";
|
||||
export type { Reference } from "./references";
|
||||
|
||||
export type {
|
||||
Discriminator,
|
||||
// Schema types
|
||||
Schema,
|
||||
Discriminator,
|
||||
// Schema types
|
||||
Schema,
|
||||
} from "./schema";
|
||||
export type {
|
||||
OAuthFlow,
|
||||
OAuthFlows,
|
||||
SecurityRequirement,
|
||||
// Security types
|
||||
SecurityScheme,
|
||||
OAuthFlow,
|
||||
OAuthFlows,
|
||||
SecurityRequirement,
|
||||
// Security types
|
||||
SecurityScheme,
|
||||
} from "./security";
|
||||
export type {
|
||||
// Server types
|
||||
Server,
|
||||
ServerVariable,
|
||||
// Server types
|
||||
Server,
|
||||
ServerVariable,
|
||||
} from "./servers";
|
||||
// Export the main specification type
|
||||
export type { Specification } from "./spec";
|
||||
export type {
|
||||
// Utility types
|
||||
Tag,
|
||||
// Utility types
|
||||
Tag,
|
||||
} from "./tags";
|
||||
export type {
|
||||
// XML types
|
||||
XML,
|
||||
// XML types
|
||||
XML,
|
||||
} from "./xml";
|
||||
|
||||
718
3.0/info.ts
718
3.0/info.ts
@@ -70,188 +70,188 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Info extends Extension {
|
||||
/**
|
||||
* The title of the application. This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - title} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - title} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - title} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - title} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - title} |
|
||||
*
|
||||
* @property `title` - Required The title of the application
|
||||
*
|
||||
* @example "Sample Pet Store App"
|
||||
* @example "My API"
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* The title of the application. This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - title} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - title} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - title} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - title} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - title} |
|
||||
*
|
||||
* @property `title` - Required The title of the application
|
||||
*
|
||||
* @example "Sample Pet Store App"
|
||||
* @example "My API"
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* A short description of the application. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A short description of the application
|
||||
*
|
||||
* @example "This is a sample server for a pet store."
|
||||
* @example "A comprehensive API for managing user data"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the application. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A short description of the application
|
||||
*
|
||||
* @example "This is a sample server for a pet store."
|
||||
* @example "A comprehensive API for managing user data"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A URL to the Terms of Service for the API. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* @property `termsOfService` - Optional A URL to the Terms of Service for the API
|
||||
*
|
||||
* @example "http://example.com/terms/"
|
||||
* @example "https://example.com/terms"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
/**
|
||||
* A URL to the Terms of Service for the API. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - termsOfService} |
|
||||
* @property `termsOfService` - Optional A URL to the Terms of Service for the API
|
||||
*
|
||||
* @example "http://example.com/terms/"
|
||||
* @example "https://example.com/terms"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* @property `contact` - Optional The contact information for the exposed API
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - contact} |
|
||||
* @property `contact` - Optional The contact information for the exposed API
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* @property `license` - Optional The license information for the exposed API
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "http://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - license} |
|
||||
* @property `license` - Optional The license information for the exposed API
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "http://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
|
||||
/**
|
||||
* The version of the OpenAPI document (which is distinct from the OpenAPI Specification version
|
||||
* or the API implementation version). This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* @property `version` - Required The version of the OpenAPI document
|
||||
*
|
||||
* @example "1.0.1"
|
||||
* @example "2.0.0"
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* The version of the OpenAPI document (which is distinct from the OpenAPI Specification version
|
||||
* or the API implementation version). This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#info-object | OpenAPI 3.0.4 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#info-object | OpenAPI 3.0.3 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#info-object | OpenAPI 3.0.2 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#info-object | OpenAPI 3.0.1 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#info-object | OpenAPI 3.0.0 Info Object - version} |
|
||||
* @property `version` - Required The version of the OpenAPI document
|
||||
*
|
||||
* @example "1.0.1"
|
||||
* @example "2.0.0"
|
||||
*/
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -317,116 +317,116 @@ export interface Info extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Contact extends Extension {
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* @property `name` - Optional The identifying name of the contact person/organization
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "John Doe"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - name} |
|
||||
* @property `name` - Optional The identifying name of the contact person/organization
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "John Doe"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URL pointing to the contact information. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* @property `url` - Optional A URL pointing to the contact information
|
||||
*
|
||||
* @example "http://www.example.com/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* The URL pointing to the contact information. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - url} |
|
||||
* @property `url` - Optional A URL pointing to the contact information
|
||||
*
|
||||
* @example "http://www.example.com/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* The email address of the contact person/organization. MUST be in the format of an email address.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* @property `email` - Optional The email address of the contact person/organization
|
||||
*
|
||||
* @example "support@example.com"
|
||||
* @example "contact@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* The email address of the contact person/organization. MUST be in the format of an email address.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#contact-object | OpenAPI 3.0.4 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#contact-object | OpenAPI 3.0.3 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#contact-object | OpenAPI 3.0.2 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#contact-object | OpenAPI 3.0.1 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#contact-object | OpenAPI 3.0.0 Contact Object - email} |
|
||||
* @property `email` - Optional The email address of the contact person/organization
|
||||
*
|
||||
* @example "support@example.com"
|
||||
* @example "contact@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -497,79 +497,79 @@ export interface Contact extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface License extends Extension {
|
||||
/**
|
||||
* The license name used for the API. This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* @property `name` - Required The license name used for the API
|
||||
*
|
||||
* @example "MIT License"
|
||||
* @example "Apache 2.0"
|
||||
* @example "Proprietary License"
|
||||
*/
|
||||
name: LicenseName;
|
||||
/**
|
||||
* The license name used for the API. This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - name} |
|
||||
* @property `name` - Required The license name used for the API
|
||||
*
|
||||
* @example "MIT License"
|
||||
* @example "Apache 2.0"
|
||||
* @example "Proprietary License"
|
||||
*/
|
||||
name: LicenseName;
|
||||
|
||||
/**
|
||||
* A URL to the license used for the API. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* @property `url` - Optional A URL to the license used for the API
|
||||
*
|
||||
* @example "https://opensource.org/license/mit/"
|
||||
* @example "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
* @example "https://example.com/licenses/proprietary-1.0"
|
||||
*/
|
||||
url?: LicenseURL;
|
||||
/**
|
||||
* A URL to the license used for the API. MUST be in the format of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#license-object | OpenAPI 3.0.4 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#license-object | OpenAPI 3.0.3 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#license-object | OpenAPI 3.0.2 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#license-object | OpenAPI 3.0.1 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#license-object | OpenAPI 3.0.0 License Object - url} |
|
||||
* @property `url` - Optional A URL to the license used for the API
|
||||
*
|
||||
* @example "https://opensource.org/license/mit/"
|
||||
* @example "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
* @example "https://example.com/licenses/proprietary-1.0"
|
||||
*/
|
||||
url?: LicenseURL;
|
||||
}
|
||||
|
||||
2504
3.0/paths.ts
2504
3.0/paths.ts
File diff suppressed because it is too large
Load Diff
@@ -38,21 +38,21 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Reference extends Extension {
|
||||
/**
|
||||
* The reference string. MUST be a valid JSON Reference.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#reference-object | OpenAPI 3.0.4 Reference Object - $ref} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#reference-object | OpenAPI 3.0.3 Reference Object - $ref} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#reference-object | OpenAPI 3.0.2 Reference Object - $ref} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#reference-object | OpenAPI 3.0.1 Reference Object - $ref} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#reference-object | OpenAPI 3.0.0 Reference Object - $ref} |
|
||||
* @property `$ref` - Required The reference string
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "#/components/parameters/LimitParam"
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* The reference string. MUST be a valid JSON Reference.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#reference-object | OpenAPI 3.0.4 Reference Object - $ref} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#reference-object | OpenAPI 3.0.3 Reference Object - $ref} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#reference-object | OpenAPI 3.0.2 Reference Object - $ref} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#reference-object | OpenAPI 3.0.1 Reference Object - $ref} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#reference-object | OpenAPI 3.0.0 Reference Object - $ref} |
|
||||
* @property `$ref` - Required The reference string
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "#/components/parameters/LimitParam"
|
||||
*/
|
||||
$ref: string;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
// Discriminator will be defined below to avoid circular reference
|
||||
|
||||
@@ -97,14 +97,14 @@ import type {
|
||||
* ```
|
||||
*/
|
||||
export type Schema =
|
||||
| ReferenceSchema
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| CompositionSchema;
|
||||
| ReferenceSchema
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| CompositionSchema;
|
||||
|
||||
/**
|
||||
* -----
|
||||
@@ -160,40 +160,40 @@ export type Schema =
|
||||
* ```
|
||||
*/
|
||||
export interface Discriminator {
|
||||
/**
|
||||
* The name of the property in the schema that is used as a discriminator.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#discriminator-object | OpenAPI 3.0.4 Discriminator Object - propertyName} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#discriminator-object | OpenAPI 3.0.3 Discriminator Object - propertyName} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#discriminator-object | OpenAPI 3.0.2 Discriminator Object - propertyName} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#discriminator-object | OpenAPI 3.0.1 Discriminator Object - propertyName} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#discriminator-object | OpenAPI 3.0.0 Discriminator Object - propertyName} |
|
||||
* @property `propertyName` - Required The name of the property in the schema that is used as a discriminator
|
||||
*
|
||||
* @example "petType"
|
||||
* @example "type"
|
||||
* @example "kind"
|
||||
*/
|
||||
propertyName: string;
|
||||
/**
|
||||
* The name of the property in the schema that is used as a discriminator.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#discriminator-object | OpenAPI 3.0.4 Discriminator Object - propertyName} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#discriminator-object | OpenAPI 3.0.3 Discriminator Object - propertyName} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#discriminator-object | OpenAPI 3.0.2 Discriminator Object - propertyName} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#discriminator-object | OpenAPI 3.0.1 Discriminator Object - propertyName} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#discriminator-object | OpenAPI 3.0.0 Discriminator Object - propertyName} |
|
||||
* @property `propertyName` - Required The name of the property in the schema that is used as a discriminator
|
||||
*
|
||||
* @example "petType"
|
||||
* @example "type"
|
||||
* @example "kind"
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* An object to hold mappings between payload values and schema names or references.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#discriminator-object | OpenAPI 3.0.4 Discriminator Object - mapping} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#discriminator-object | OpenAPI 3.0.3 Discriminator Object - mapping} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#discriminator-object | OpenAPI 3.0.2 Discriminator Object - mapping} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#discriminator-object | OpenAPI 3.0.1 Discriminator Object - mapping} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#discriminator-object | OpenAPI 3.0.0 Discriminator Object - mapping} |
|
||||
* @property `mapping` - Optional An object to hold mappings between payload values and schema names or references
|
||||
*
|
||||
* @example { "dog": "Dog", "cat": "Cat" }
|
||||
* @example { "admin": "AdminUser", "user": "RegularUser" }
|
||||
*/
|
||||
mapping?: Record<string, string>;
|
||||
/**
|
||||
* An object to hold mappings between payload values and schema names or references.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#discriminator-object | OpenAPI 3.0.4 Discriminator Object - mapping} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#discriminator-object | OpenAPI 3.0.3 Discriminator Object - mapping} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#discriminator-object | OpenAPI 3.0.2 Discriminator Object - mapping} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#discriminator-object | OpenAPI 3.0.1 Discriminator Object - mapping} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#discriminator-object | OpenAPI 3.0.0 Discriminator Object - mapping} |
|
||||
* @property `mapping` - Optional An object to hold mappings between payload values and schema names or references
|
||||
*
|
||||
* @example { "dog": "Dog", "cat": "Cat" }
|
||||
* @example { "admin": "AdminUser", "user": "RegularUser" }
|
||||
*/
|
||||
mapping?: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
508
3.0/security.ts
508
3.0/security.ts
@@ -90,142 +90,142 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityScheme extends Extension {
|
||||
/**
|
||||
* The type of the security scheme. This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - type} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - type} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - type} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - type} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - type} |
|
||||
* @property `type` - Required The type of the security scheme
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "http"
|
||||
* @example "oauth2"
|
||||
* @example "openIdConnect"
|
||||
*/
|
||||
type: "apiKey" | "http" | "oauth2" | "openIdConnect";
|
||||
/**
|
||||
* The type of the security scheme. This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - type} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - type} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - type} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - type} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - type} |
|
||||
* @property `type` - Required The type of the security scheme
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "http"
|
||||
* @example "oauth2"
|
||||
* @example "openIdConnect"
|
||||
*/
|
||||
type: "apiKey" | "http" | "oauth2" | "openIdConnect";
|
||||
|
||||
/**
|
||||
* A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - description} |
|
||||
* @property `description` - Optional A short description for security scheme
|
||||
*
|
||||
* @example "API key authentication"
|
||||
* @example "OAuth 2.0 authentication"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - description} |
|
||||
* @property `description` - Optional A short description for security scheme
|
||||
*
|
||||
* @example "API key authentication"
|
||||
* @example "OAuth 2.0 authentication"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The name of the header, query or cookie parameter to be used.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - name} |
|
||||
* @property `name` - Optional The name of the header, query or cookie parameter to be used
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "Authorization"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The name of the header, query or cookie parameter to be used.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - name} |
|
||||
* @property `name` - Optional The name of the header, query or cookie parameter to be used
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "Authorization"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The location of the API key. Valid values are "query", "header" or "cookie".
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - in} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - in} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - in} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - in} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - in} |
|
||||
* @property `in` - Optional The location of the API key
|
||||
*
|
||||
* @example "query"
|
||||
* @example "header"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in?: "query" | "header" | "cookie";
|
||||
/**
|
||||
* The location of the API key. Valid values are "query", "header" or "cookie".
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - in} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - in} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - in} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - in} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - in} |
|
||||
* @property `in` - Optional The location of the API key
|
||||
*
|
||||
* @example "query"
|
||||
* @example "header"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in?: "query" | "header" | "cookie";
|
||||
|
||||
/**
|
||||
* The name of the HTTP Authorization scheme to be used in the Authorization header.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - scheme} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - scheme} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - scheme} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - scheme} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - scheme} |
|
||||
* @property `scheme` - Optional The name of the HTTP Authorization scheme to be used in the Authorization header
|
||||
*
|
||||
* @example "bearer"
|
||||
* @example "basic"
|
||||
*/
|
||||
scheme?: string;
|
||||
/**
|
||||
* The name of the HTTP Authorization scheme to be used in the Authorization header.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - scheme} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - scheme} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - scheme} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - scheme} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - scheme} |
|
||||
* @property `scheme` - Optional The name of the HTTP Authorization scheme to be used in the Authorization header
|
||||
*
|
||||
* @example "bearer"
|
||||
* @example "basic"
|
||||
*/
|
||||
scheme?: string;
|
||||
|
||||
/**
|
||||
* A hint to the client to identify how the bearer token is formatted.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - bearerFormat} |
|
||||
* @property `bearerFormat` - Optional A hint to the client to identify how the bearer token is formatted
|
||||
*
|
||||
* @example "JWT"
|
||||
* @example "Bearer"
|
||||
*/
|
||||
bearerFormat?: string;
|
||||
/**
|
||||
* A hint to the client to identify how the bearer token is formatted.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - bearerFormat} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - bearerFormat} |
|
||||
* @property `bearerFormat` - Optional A hint to the client to identify how the bearer token is formatted
|
||||
*
|
||||
* @example "JWT"
|
||||
* @example "Bearer"
|
||||
*/
|
||||
bearerFormat?: string;
|
||||
|
||||
/**
|
||||
* An object containing configuration information for the flow types supported.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - flows} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - flows} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - flows} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - flows} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - flows} |
|
||||
* @property `flows` - Optional An object containing configuration information for the flow types supported
|
||||
*
|
||||
* @example { authorizationCode: { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token" } }
|
||||
*/
|
||||
flows?: OAuthFlows;
|
||||
/**
|
||||
* An object containing configuration information for the flow types supported.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - flows} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - flows} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - flows} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - flows} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - flows} |
|
||||
* @property `flows` - Optional An object containing configuration information for the flow types supported
|
||||
*
|
||||
* @example { authorizationCode: { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token" } }
|
||||
*/
|
||||
flows?: OAuthFlows;
|
||||
|
||||
/**
|
||||
* OpenId Connect URL to discover OAuth2 configuration values.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - openIdConnectUrl} |
|
||||
* @property `openIdConnectUrl` - Optional OpenId Connect URL to discover OAuth2 configuration values
|
||||
*
|
||||
* @example "https://example.com/.well-known/openid_configuration"
|
||||
*/
|
||||
openIdConnectUrl?: string;
|
||||
/**
|
||||
* OpenId Connect URL to discover OAuth2 configuration values.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#security-scheme-object | OpenAPI 3.0.4 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#security-scheme-object | OpenAPI 3.0.3 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#security-scheme-object | OpenAPI 3.0.2 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#security-scheme-object | OpenAPI 3.0.1 Security Scheme Object - openIdConnectUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#security-scheme-object | OpenAPI 3.0.0 Security Scheme Object - openIdConnectUrl} |
|
||||
* @property `openIdConnectUrl` - Optional OpenId Connect URL to discover OAuth2 configuration values
|
||||
*
|
||||
* @example "https://example.com/.well-known/openid_configuration"
|
||||
*/
|
||||
openIdConnectUrl?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -297,69 +297,69 @@ export interface SecurityScheme extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlows extends Extension {
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - implicit} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - implicit} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - implicit} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - implicit} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - implicit} |
|
||||
* @property `implicit` - Optional Configuration for the OAuth Implicit flow
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", scopes: { read: "Read access" } }
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - implicit} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - implicit} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - implicit} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - implicit} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - implicit} |
|
||||
* @property `implicit` - Optional Configuration for the OAuth Implicit flow
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", scopes: { read: "Read access" } }
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - password} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - password} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - password} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - password} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - password} |
|
||||
* @property `password` - Optional Configuration for the OAuth Resource Owner Password flow
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { read: "Read access" } }
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - password} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - password} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - password} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - password} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - password} |
|
||||
* @property `password` - Optional Configuration for the OAuth Resource Owner Password flow
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { read: "Read access" } }
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - clientCredentials} |
|
||||
* @property `clientCredentials` - Optional Configuration for the OAuth Client Credentials flow
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { read: "Read access" } }
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - clientCredentials} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - clientCredentials} |
|
||||
* @property `clientCredentials` - Optional Configuration for the OAuth Client Credentials flow
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { read: "Read access" } }
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - authorizationCode} |
|
||||
* @property `authorizationCode` - Optional Configuration for the OAuth Authorization Code flow
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { read: "Read access" } }
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flows-object | OpenAPI 3.0.4 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flows-object | OpenAPI 3.0.3 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flows-object | OpenAPI 3.0.2 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flows-object | OpenAPI 3.0.1 OAuth Flows Object - authorizationCode} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flows-object | OpenAPI 3.0.0 OAuth Flows Object - authorizationCode} |
|
||||
* @property `authorizationCode` - Optional Configuration for the OAuth Authorization Code flow
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { read: "Read access" } }
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -433,73 +433,73 @@ export interface OAuthFlows extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlow extends Extension {
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - authorizationUrl} |
|
||||
* @property `authorizationUrl` - Optional The authorization URL to be used for this flow
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
* @example "https://api.example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - authorizationUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - authorizationUrl} |
|
||||
* @property `authorizationUrl` - Optional The authorization URL to be used for this flow
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
* @example "https://api.example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
|
||||
/**
|
||||
* The token URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - tokenUrl} |
|
||||
* @property `tokenUrl` - Optional The token URL to be used for this flow
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
* @example "https://api.example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
/**
|
||||
* The token URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - tokenUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - tokenUrl} |
|
||||
* @property `tokenUrl` - Optional The token URL to be used for this flow
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
* @example "https://api.example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - refreshUrl} |
|
||||
* @property `refreshUrl` - Optional The URL to be used for obtaining refresh tokens
|
||||
*
|
||||
* @example "https://example.com/oauth/refresh"
|
||||
* @example "https://api.example.com/oauth/refresh"
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - refreshUrl} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - refreshUrl} |
|
||||
* @property `refreshUrl` - Optional The URL to be used for obtaining refresh tokens
|
||||
*
|
||||
* @example "https://example.com/oauth/refresh"
|
||||
* @example "https://api.example.com/oauth/refresh"
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - scopes} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - scopes} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - scopes} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - scopes} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - scopes} |
|
||||
* @property `scopes` - Required The available scopes for the OAuth2 security scheme
|
||||
*
|
||||
* @example { "read": "Read access", "write": "Write access" }
|
||||
* @example { "admin": "Administrative access" }
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#oauth-flow-object | OpenAPI 3.0.4 OAuth Flow Object - scopes} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#oauth-flow-object | OpenAPI 3.0.3 OAuth Flow Object - scopes} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#oauth-flow-object | OpenAPI 3.0.2 OAuth Flow Object - scopes} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#oauth-flow-object | OpenAPI 3.0.1 OAuth Flow Object - scopes} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#oauth-flow-object | OpenAPI 3.0.0 OAuth Flow Object - scopes} |
|
||||
* @property `scopes` - Required The available scopes for the OAuth2 security scheme
|
||||
*
|
||||
* @example { "read": "Read access", "write": "Write access" }
|
||||
* @example { "admin": "Administrative access" }
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -567,5 +567,5 @@ export interface OAuthFlow extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityRequirement {
|
||||
[schemeName: string]: string[];
|
||||
[schemeName: string]: string[];
|
||||
}
|
||||
|
||||
206
3.0/servers.ts
206
3.0/servers.ts
@@ -75,61 +75,61 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Server extends Extension {
|
||||
/**
|
||||
* A URL to the target host. This URL supports Server Variables and MAY be relative,
|
||||
* to indicate that the host location is relative to the location where the OpenAPI
|
||||
* document is being served. Variable substitutions will be made when a variable
|
||||
* is named in {brackets}.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-object | OpenAPI 3.0.4 Server Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-object | OpenAPI 3.0.3 Server Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-object | OpenAPI 3.0.2 Server Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-object | OpenAPI 3.0.1 Server Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-object | OpenAPI 3.0.0 Server Object - url} |
|
||||
* @property `url` - Required A URL to the target host
|
||||
*
|
||||
* @example "https://api.example.com/v1"
|
||||
* @example "https://{username}.example.com:{port}/{basePath}"
|
||||
* @example "/v1"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A URL to the target host. This URL supports Server Variables and MAY be relative,
|
||||
* to indicate that the host location is relative to the location where the OpenAPI
|
||||
* document is being served. Variable substitutions will be made when a variable
|
||||
* is named in {brackets}.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-object | OpenAPI 3.0.4 Server Object - url} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-object | OpenAPI 3.0.3 Server Object - url} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-object | OpenAPI 3.0.2 Server Object - url} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-object | OpenAPI 3.0.1 Server Object - url} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-object | OpenAPI 3.0.0 Server Object - url} |
|
||||
* @property `url` - Required A URL to the target host
|
||||
*
|
||||
* @example "https://api.example.com/v1"
|
||||
* @example "https://{username}.example.com:{port}/{basePath}"
|
||||
* @example "/v1"
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* An optional string describing the host designated by the URL.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-object | OpenAPI 3.0.4 Server Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-object | OpenAPI 3.0.3 Server Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-object | OpenAPI 3.0.2 Server Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-object | OpenAPI 3.0.1 Server Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-object | OpenAPI 3.0.0 Server Object - description} |
|
||||
* @property `description` - Optional An optional string describing the host designated by the URL
|
||||
*
|
||||
* @example "Development server"
|
||||
* @example "Production server"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional string describing the host designated by the URL.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-object | OpenAPI 3.0.4 Server Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-object | OpenAPI 3.0.3 Server Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-object | OpenAPI 3.0.2 Server Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-object | OpenAPI 3.0.1 Server Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-object | OpenAPI 3.0.0 Server Object - description} |
|
||||
* @property `description` - Optional An optional string describing the host designated by the URL
|
||||
*
|
||||
* @example "Development server"
|
||||
* @example "Production server"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A map between a variable name and its value. The value is used for substitution
|
||||
* in the server's URL template.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-object | OpenAPI 3.0.4 Server Object - variables} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-object | OpenAPI 3.0.3 Server Object - variables} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-object | OpenAPI 3.0.2 Server Object - variables} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-object | OpenAPI 3.0.1 Server Object - variables} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-object | OpenAPI 3.0.0 Server Object - variables} |
|
||||
* @property `variables` - Optional A map between a variable name and its value
|
||||
*
|
||||
* @example { username: { default: "demo" }, port: { default: "8080" } }
|
||||
*/
|
||||
variables?: Record<string, ServerVariable>;
|
||||
/**
|
||||
* A map between a variable name and its value. The value is used for substitution
|
||||
* in the server's URL template.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-object | OpenAPI 3.0.4 Server Object - variables} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-object | OpenAPI 3.0.3 Server Object - variables} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-object | OpenAPI 3.0.2 Server Object - variables} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-object | OpenAPI 3.0.1 Server Object - variables} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-object | OpenAPI 3.0.0 Server Object - variables} |
|
||||
* @property `variables` - Optional A map between a variable name and its value
|
||||
*
|
||||
* @example { username: { default: "demo" }, port: { default: "8080" } }
|
||||
*/
|
||||
variables?: Record<string, ServerVariable>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,56 +196,56 @@ export interface Server extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface ServerVariable extends Extension {
|
||||
/**
|
||||
* An enumeration of string values to be used if the substitution options are from a limited set.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-variable-object | OpenAPI 3.0.4 Server Variable Object - enum} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-variable-object | OpenAPI 3.0.3 Server Variable Object - enum} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-variable-object | OpenAPI 3.0.2 Server Variable Object - enum} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-variable-object | OpenAPI 3.0.1 Server Variable Object - enum} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-variable-object | OpenAPI 3.0.0 Server Variable Object - enum} |
|
||||
* @property `enum` - Optional An enumeration of string values to be used if the substitution options are from a limited set
|
||||
*
|
||||
* @example ["8443", "443"]
|
||||
* @example ["v1", "v2", "v3"]
|
||||
*/
|
||||
enum?: string[];
|
||||
/**
|
||||
* An enumeration of string values to be used if the substitution options are from a limited set.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-variable-object | OpenAPI 3.0.4 Server Variable Object - enum} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-variable-object | OpenAPI 3.0.3 Server Variable Object - enum} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-variable-object | OpenAPI 3.0.2 Server Variable Object - enum} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-variable-object | OpenAPI 3.0.1 Server Variable Object - enum} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-variable-object | OpenAPI 3.0.0 Server Variable Object - enum} |
|
||||
* @property `enum` - Optional An enumeration of string values to be used if the substitution options are from a limited set
|
||||
*
|
||||
* @example ["8443", "443"]
|
||||
* @example ["v1", "v2", "v3"]
|
||||
*/
|
||||
enum?: string[];
|
||||
|
||||
/**
|
||||
* The default value to use for substitution, and to send, if an alternate value is not supplied.
|
||||
* Unlike the Schema Object's default, this value MUST be provided by the consumer.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-variable-object | OpenAPI 3.0.4 Server Variable Object - default} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-variable-object | OpenAPI 3.0.3 Server Variable Object - default} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-variable-object | OpenAPI 3.0.2 Server Variable Object - default} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-variable-object | OpenAPI 3.0.1 Server Variable Object - default} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-variable-object | OpenAPI 3.0.0 Server Variable Object - default} |
|
||||
* @property `default` - Required The default value to use for substitution
|
||||
*
|
||||
* @example "demo"
|
||||
* @example "8443"
|
||||
* @example "v2"
|
||||
*/
|
||||
default: string;
|
||||
/**
|
||||
* The default value to use for substitution, and to send, if an alternate value is not supplied.
|
||||
* Unlike the Schema Object's default, this value MUST be provided by the consumer.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-variable-object | OpenAPI 3.0.4 Server Variable Object - default} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-variable-object | OpenAPI 3.0.3 Server Variable Object - default} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-variable-object | OpenAPI 3.0.2 Server Variable Object - default} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-variable-object | OpenAPI 3.0.1 Server Variable Object - default} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-variable-object | OpenAPI 3.0.0 Server Variable Object - default} |
|
||||
* @property `default` - Required The default value to use for substitution
|
||||
*
|
||||
* @example "demo"
|
||||
* @example "8443"
|
||||
* @example "v2"
|
||||
*/
|
||||
default: string;
|
||||
|
||||
/**
|
||||
* An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-variable-object | OpenAPI 3.0.4 Server Variable Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-variable-object | OpenAPI 3.0.3 Server Variable Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-variable-object | OpenAPI 3.0.2 Server Variable Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-variable-object | OpenAPI 3.0.1 Server Variable Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-variable-object | OpenAPI 3.0.0 Server Variable Object - description} |
|
||||
* @property `description` - Optional An optional description for the server variable
|
||||
*
|
||||
* @example "this value is assigned by the service provider"
|
||||
* @example "Port number for the server"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#server-variable-object | OpenAPI 3.0.4 Server Variable Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#server-variable-object | OpenAPI 3.0.3 Server Variable Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#server-variable-object | OpenAPI 3.0.2 Server Variable Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#server-variable-object | OpenAPI 3.0.1 Server Variable Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#server-variable-object | OpenAPI 3.0.0 Server Variable Object - description} |
|
||||
* @property `description` - Optional An optional description for the server variable
|
||||
*
|
||||
* @example "this value is assigned by the service provider"
|
||||
* @example "Port number for the server"
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
284
3.0/spec.ts
284
3.0/spec.ts
@@ -103,153 +103,153 @@ import type { Tag } from "./tags";
|
||||
* ```
|
||||
*/
|
||||
export type Specification = {
|
||||
/**
|
||||
* Specifies the OpenAPI specification version being used.
|
||||
* Must be "3.0.0" for this specification.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - openapi} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - openapi} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - openapi} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - openapi} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - openapi} |
|
||||
*
|
||||
* @property `openapi` - Required The OpenAPI specification version
|
||||
*/
|
||||
openapi: "3.0.0" | "3.0.1" | "3.0.2" | "3.0.3" | "3.0.4";
|
||||
/**
|
||||
* Specifies the OpenAPI specification version being used.
|
||||
* Must be "3.0.0" for this specification.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - openapi} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - openapi} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - openapi} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - openapi} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - openapi} |
|
||||
*
|
||||
* @property `openapi` - Required The OpenAPI specification version
|
||||
*/
|
||||
openapi: "3.0.0" | "3.0.1" | "3.0.2" | "3.0.3" | "3.0.4";
|
||||
|
||||
/**
|
||||
* Provides metadata about the API. The metadata can be used by the clients
|
||||
* if needed, and can be presented in the OpenAPI-UI for convenience.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - info} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - info} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - info} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - info} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - info} |
|
||||
*
|
||||
* @property `info` - Required Metadata about the API
|
||||
*/
|
||||
info: Info;
|
||||
/**
|
||||
* Provides metadata about the API. The metadata can be used by the clients
|
||||
* if needed, and can be presented in the OpenAPI-UI for convenience.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - info} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - info} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - info} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - info} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - info} |
|
||||
*
|
||||
* @property `info` - Required Metadata about the API
|
||||
*/
|
||||
info: Info;
|
||||
|
||||
/**
|
||||
* An array of Server Objects, which provide connectivity information to a target server.
|
||||
* If the servers property is not provided, or is an empty array, the default value
|
||||
* would be a Server Object with a url value of "/".
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - servers} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - servers} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - servers} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - servers} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - servers} |
|
||||
*
|
||||
* @property `servers` - Optional Array of server objects
|
||||
*
|
||||
* @example [{ url: "https://api.example.com/v1", description: "Production server" }]
|
||||
* @example [{ url: "https://staging-api.example.com/v1", description: "Staging server" }]
|
||||
*/
|
||||
servers?: Server[];
|
||||
/**
|
||||
* An array of Server Objects, which provide connectivity information to a target server.
|
||||
* If the servers property is not provided, or is an empty array, the default value
|
||||
* would be a Server Object with a url value of "/".
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - servers} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - servers} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - servers} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - servers} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - servers} |
|
||||
*
|
||||
* @property `servers` - Optional Array of server objects
|
||||
*
|
||||
* @example [{ url: "https://api.example.com/v1", description: "Production server" }]
|
||||
* @example [{ url: "https://staging-api.example.com/v1", description: "Staging server" }]
|
||||
*/
|
||||
servers?: Server[];
|
||||
|
||||
/**
|
||||
* The available paths and operations for the API. This is the root of the
|
||||
* Path Item Object. It does not define a path or a basePath, they are defined
|
||||
* in the Paths Object. A relative path to an individual endpoint. The field
|
||||
* name MUST begin with a slash. The path is appended to the basePath in order
|
||||
* to construct the full URL. Path templating is allowed.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - paths} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - paths} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - paths} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - paths} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - paths} |
|
||||
*
|
||||
* @property `paths` - Required Available paths and operations for the API
|
||||
*
|
||||
* @example { "/users": { get: { ... } } }
|
||||
* @example { "/users/{id}": { get: { ... } } }
|
||||
*/
|
||||
paths: Paths;
|
||||
/**
|
||||
* The available paths and operations for the API. This is the root of the
|
||||
* Path Item Object. It does not define a path or a basePath, they are defined
|
||||
* in the Paths Object. A relative path to an individual endpoint. The field
|
||||
* name MUST begin with a slash. The path is appended to the basePath in order
|
||||
* to construct the full URL. Path templating is allowed.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - paths} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - paths} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - paths} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - paths} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - paths} |
|
||||
*
|
||||
* @property `paths` - Required Available paths and operations for the API
|
||||
*
|
||||
* @example { "/users": { get: { ... } } }
|
||||
* @example { "/users/{id}": { get: { ... } } }
|
||||
*/
|
||||
paths: Paths;
|
||||
|
||||
/**
|
||||
* An element to hold various schemas for the specification.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - components} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - components} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - components} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - components} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - components} |
|
||||
*
|
||||
* @property `components` - Optional Reusable objects for different aspects of the OAS
|
||||
*
|
||||
* @example { schemas: { User: { type: "object", properties: { ... } } } }
|
||||
*/
|
||||
components?: Components;
|
||||
/**
|
||||
* An element to hold various schemas for the specification.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - components} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - components} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - components} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - components} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - components} |
|
||||
*
|
||||
* @property `components` - Optional Reusable objects for different aspects of the OAS
|
||||
*
|
||||
* @example { schemas: { User: { type: "object", properties: { ... } } } }
|
||||
*/
|
||||
components?: Components;
|
||||
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used across the API.
|
||||
* The list of values includes alternative security requirement objects that can be used.
|
||||
* Only one of the security requirement objects need to be satisfied to authorize a request.
|
||||
* Individual operations can override this definition.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - security} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - security} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - security} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - security} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - security} |
|
||||
*
|
||||
* @property `security` - Optional Security mechanisms for the API
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
* @example [{ "oauth2": ["read", "write"] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used across the API.
|
||||
* The list of values includes alternative security requirement objects that can be used.
|
||||
* Only one of the security requirement objects need to be satisfied to authorize a request.
|
||||
* Individual operations can override this definition.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - security} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - security} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - security} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - security} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - security} |
|
||||
*
|
||||
* @property `security` - Optional Security mechanisms for the API
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
* @example [{ "oauth2": ["read", "write"] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
|
||||
/**
|
||||
* A list of tags used by the specification with additional metadata.
|
||||
* The order of the tags can be used to reflect on their order by the
|
||||
* parsing tools. Not all tags that are used by the Operation Object must
|
||||
* be declared. The tags that are not declared may be organized randomly
|
||||
* or based on the tools' logic. Each tag name in the list MUST be unique.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - tags} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - tags} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - tags} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - tags} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - tags} |
|
||||
*
|
||||
* @property `tags` - Optional List of tags with additional metadata
|
||||
*
|
||||
* @example [{ name: "users", description: "User management" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
/**
|
||||
* A list of tags used by the specification with additional metadata.
|
||||
* The order of the tags can be used to reflect on their order by the
|
||||
* parsing tools. Not all tags that are used by the Operation Object must
|
||||
* be declared. The tags that are not declared may be organized randomly
|
||||
* or based on the tools' logic. Each tag name in the list MUST be unique.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - tags} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - tags} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - tags} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - tags} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - tags} |
|
||||
*
|
||||
* @property `tags` - Optional List of tags with additional metadata
|
||||
*
|
||||
* @example [{ name: "users", description: "User management" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - externalDocs} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - externalDocs} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - externalDocs} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - externalDocs} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - externalDocs} |
|
||||
*
|
||||
* @property `externalDocs` - Optional Additional external documentation
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#openapi-object | OpenAPI 3.0.4 Specification - externalDocs} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#openapi-object | OpenAPI 3.0.3 Specification - externalDocs} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#openapi-object | OpenAPI 3.0.2 Specification - externalDocs} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#openapi-object | OpenAPI 3.0.1 Specification - externalDocs} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#openapi-object | OpenAPI 3.0.0 Specification - externalDocs} |
|
||||
*
|
||||
* @property `externalDocs` - Optional Additional external documentation
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
} & Extension;
|
||||
|
||||
1970
3.0/status.ts
1970
3.0/status.ts
File diff suppressed because it is too large
Load Diff
96
3.0/tags.ts
96
3.0/tags.ts
@@ -58,54 +58,54 @@ import type { ExternalDocumentation } from "./externalDocs";
|
||||
* ```
|
||||
*/
|
||||
export interface Tag extends Extension {
|
||||
/**
|
||||
* The name of the tag. This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#tag-object | OpenAPI 3.0.4 Tag Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#tag-object | OpenAPI 3.0.3 Tag Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#tag-object | OpenAPI 3.0.2 Tag Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#tag-object | OpenAPI 3.0.1 Tag Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#tag-object | OpenAPI 3.0.0 Tag Object - name} |
|
||||
* @property `name` - Required The name of the tag
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the tag. This field is required.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#tag-object | OpenAPI 3.0.4 Tag Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#tag-object | OpenAPI 3.0.3 Tag Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#tag-object | OpenAPI 3.0.2 Tag Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#tag-object | OpenAPI 3.0.1 Tag Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#tag-object | OpenAPI 3.0.0 Tag Object - name} |
|
||||
* @property `name` - Required The name of the tag
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A short description for the tag. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#tag-object | OpenAPI 3.0.4 Tag Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#tag-object | OpenAPI 3.0.3 Tag Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#tag-object | OpenAPI 3.0.2 Tag Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#tag-object | OpenAPI 3.0.1 Tag Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#tag-object | OpenAPI 3.0.0 Tag Object - description} |
|
||||
* @property `description` - Optional A short description for the tag
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for the tag. CommonMark syntax MAY be used for rich text representation.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#tag-object | OpenAPI 3.0.4 Tag Object - description} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#tag-object | OpenAPI 3.0.3 Tag Object - description} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#tag-object | OpenAPI 3.0.2 Tag Object - description} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#tag-object | OpenAPI 3.0.1 Tag Object - description} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#tag-object | OpenAPI 3.0.0 Tag Object - description} |
|
||||
* @property `description` - Optional A short description for the tag
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#tag-object | OpenAPI 3.0.4 Tag Object - externalDocs} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#tag-object | OpenAPI 3.0.3 Tag Object - externalDocs} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#tag-object | OpenAPI 3.0.2 Tag Object - externalDocs} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#tag-object | OpenAPI 3.0.1 Tag Object - externalDocs} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#tag-object | OpenAPI 3.0.0 Tag Object - externalDocs} |
|
||||
* @property `externalDocs` - Optional Additional external documentation for this tag
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#tag-object | OpenAPI 3.0.4 Tag Object - externalDocs} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#tag-object | OpenAPI 3.0.3 Tag Object - externalDocs} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#tag-object | OpenAPI 3.0.2 Tag Object - externalDocs} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#tag-object | OpenAPI 3.0.1 Tag Object - externalDocs} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#tag-object | OpenAPI 3.0.0 Tag Object - externalDocs} |
|
||||
* @property `externalDocs` - Optional Additional external documentation for this tag
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
}
|
||||
|
||||
172
3.0/xml.ts
172
3.0/xml.ts
@@ -76,94 +76,94 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface XML extends Extension {
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* When defined within items, it will affect the name of the individual XML elements within the list.
|
||||
* When defined alongside type being array (outside the items), it will affect the wrapping element
|
||||
* and only if wrapped is true. If wrapped is false, it will affect the items within the array.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - name} |
|
||||
* @property `name` - Optional Replaces the name of the element/attribute used for the described schema property
|
||||
*
|
||||
* @example "animal"
|
||||
* @example "item"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* When defined within items, it will affect the name of the individual XML elements within the list.
|
||||
* When defined alongside type being array (outside the items), it will affect the wrapping element
|
||||
* and only if wrapped is true. If wrapped is false, it will affect the items within the array.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - name} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - name} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - name} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - name} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - name} |
|
||||
* @property `name` - Optional Replaces the name of the element/attribute used for the described schema property
|
||||
*
|
||||
* @example "animal"
|
||||
* @example "item"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URL of the namespace definition. Value SHOULD be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - namespace} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - namespace} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - namespace} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - namespace} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - namespace} |
|
||||
* @property `namespace` - Optional The URL of the namespace definition
|
||||
*
|
||||
* @example "http://example.com/schema"
|
||||
* @example "http://www.w3.org/XML/1998/namespace"
|
||||
*/
|
||||
namespace?: string;
|
||||
/**
|
||||
* The URL of the namespace definition. Value SHOULD be in the form of a URL.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - namespace} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - namespace} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - namespace} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - namespace} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - namespace} |
|
||||
* @property `namespace` - Optional The URL of the namespace definition
|
||||
*
|
||||
* @example "http://example.com/schema"
|
||||
* @example "http://www.w3.org/XML/1998/namespace"
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* The prefix to be used for the name.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - prefix} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - prefix} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - prefix} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - prefix} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - prefix} |
|
||||
* @property `prefix` - Optional The prefix to be used for the name
|
||||
*
|
||||
* @example "xs"
|
||||
* @example "ns"
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* The prefix to be used for the name.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - prefix} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - prefix} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - prefix} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - prefix} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - prefix} |
|
||||
* @property `prefix` - Optional The prefix to be used for the name
|
||||
*
|
||||
* @example "xs"
|
||||
* @example "ns"
|
||||
*/
|
||||
prefix?: string;
|
||||
|
||||
/**
|
||||
* Declares whether the property definition translates to an attribute instead of an element.
|
||||
* Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - attribute} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - attribute} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - attribute} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - attribute} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - attribute} |
|
||||
* @property `attribute` - Optional Declares whether the property definition translates to an attribute instead of an element
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
attribute?: boolean;
|
||||
/**
|
||||
* Declares whether the property definition translates to an attribute instead of an element.
|
||||
* Default value is false.
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - attribute} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - attribute} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - attribute} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - attribute} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - attribute} |
|
||||
* @property `attribute` - Optional Declares whether the property definition translates to an attribute instead of an element
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
attribute?: boolean;
|
||||
|
||||
/**
|
||||
* MAY be used only for an array definition. Signifies whether the array is wrapped (for example,
|
||||
* <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false.
|
||||
* The definition takes effect only when defined alongside type being array (outside the items).
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - wrapped} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - wrapped} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - wrapped} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - wrapped} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - wrapped} |
|
||||
* @property `wrapped` - Optional MAY be used only for an array definition. Signifies whether the array is wrapped
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
wrapped?: boolean;
|
||||
/**
|
||||
* MAY be used only for an array definition. Signifies whether the array is wrapped (for example,
|
||||
* <books><book/><book/></books>) or unwrapped (<book/><book/>). Default value is false.
|
||||
* The definition takes effect only when defined alongside type being array (outside the items).
|
||||
* *
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.0.4 | {@link https://spec.openapis.org/oas/v3.0.4#xml-object | OpenAPI 3.0.4 XML Object - wrapped} |
|
||||
* | 3.0.3 | {@link https://spec.openapis.org/oas/v3.0.3#xml-object | OpenAPI 3.0.3 XML Object - wrapped} |
|
||||
* | 3.0.2 | {@link https://spec.openapis.org/oas/v3.0.2#xml-object | OpenAPI 3.0.2 XML Object - wrapped} |
|
||||
* | 3.0.1 | {@link https://spec.openapis.org/oas/v3.0.1#xml-object | OpenAPI 3.0.1 XML Object - wrapped} |
|
||||
* | 3.0.0 | {@link https://spec.openapis.org/oas/v3.0.0#xml-object | OpenAPI 3.0.0 XML Object - wrapped} |
|
||||
* @property `wrapped` - Optional MAY be used only for an array definition. Signifies whether the array is wrapped
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
wrapped?: boolean;
|
||||
}
|
||||
|
||||
1301
3.1/3.1.0.md
1301
3.1/3.1.0.md
File diff suppressed because it is too large
Load Diff
860
3.1/3.1.1.md
860
3.1/3.1.1.md
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
import type { Extension } from "./extensions";
|
||||
import type {
|
||||
Callback,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
Parameter,
|
||||
PathItem,
|
||||
RequestBody,
|
||||
Response,
|
||||
Callback,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
Parameter,
|
||||
PathItem,
|
||||
RequestBody,
|
||||
Response,
|
||||
} from "./paths";
|
||||
import type { Reference } from "./references";
|
||||
import type { Schema } from "./schema";
|
||||
@@ -71,73 +71,73 @@ import type { SecurityScheme } from "./security";
|
||||
* ```
|
||||
*/
|
||||
export interface Components extends Extension {
|
||||
/**
|
||||
* An object to hold reusable Schema Objects.
|
||||
*
|
||||
* @example { User: { type: "object", properties: { id: { type: "integer" } } } }
|
||||
*/
|
||||
schemas?: Record<string, Schema | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Schema Objects.
|
||||
*
|
||||
* @example { User: { type: "object", properties: { id: { type: "integer" } } } }
|
||||
*/
|
||||
schemas?: Record<string, Schema | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Response Objects.
|
||||
*
|
||||
* @example { NotFound: { description: "Resource not found" } }
|
||||
*/
|
||||
responses?: Record<string, Response | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Response Objects.
|
||||
*
|
||||
* @example { NotFound: { description: "Resource not found" } }
|
||||
*/
|
||||
responses?: Record<string, Response | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Parameter Objects.
|
||||
*
|
||||
* @example { UserId: { name: "userId", in: "path", required: true, schema: { type: "string" } } }
|
||||
*/
|
||||
parameters?: Record<string, Parameter | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Parameter Objects.
|
||||
*
|
||||
* @example { UserId: { name: "userId", in: "path", required: true, schema: { type: "string" } } }
|
||||
*/
|
||||
parameters?: Record<string, Parameter | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Example Objects.
|
||||
*
|
||||
* @example { UserExample: { value: { id: 1, name: "John Doe" } } }
|
||||
*/
|
||||
examples?: Record<string, Example | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Example Objects.
|
||||
*
|
||||
* @example { UserExample: { value: { id: 1, name: "John Doe" } } }
|
||||
*/
|
||||
examples?: Record<string, Example | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Request Body Objects.
|
||||
*
|
||||
* @example { UserRequestBody: { description: "User data", content: { "application/json": { schema: { $ref: "#/components/schemas/User" } } } } }
|
||||
*/
|
||||
requestBodies?: Record<string, RequestBody | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Request Body Objects.
|
||||
*
|
||||
* @example { UserRequestBody: { description: "User data", content: { "application/json": { schema: { $ref: "#/components/schemas/User" } } } } }
|
||||
*/
|
||||
requestBodies?: Record<string, RequestBody | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Header Objects.
|
||||
*
|
||||
* @example { RateLimit: { description: "Rate limit per hour", schema: { type: "integer" } } }
|
||||
*/
|
||||
headers?: Record<string, Header | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Header Objects.
|
||||
*
|
||||
* @example { RateLimit: { description: "Rate limit per hour", schema: { type: "integer" } } }
|
||||
*/
|
||||
headers?: Record<string, Header | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Security Scheme Objects.
|
||||
*
|
||||
* @example { ApiKeyAuth: { type: "apiKey", in: "header", name: "X-API-KEY" } }
|
||||
*/
|
||||
securitySchemes?: Record<string, SecurityScheme | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Security Scheme Objects.
|
||||
*
|
||||
* @example { ApiKeyAuth: { type: "apiKey", in: "header", name: "X-API-KEY" } }
|
||||
*/
|
||||
securitySchemes?: Record<string, SecurityScheme | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Link Objects.
|
||||
*
|
||||
* @example { UserOrders: { operationId: "getOrdersByUserId", parameters: { userId: "$response.body#/id" } } }
|
||||
*/
|
||||
links?: Record<string, Link | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Link Objects.
|
||||
*
|
||||
* @example { UserOrders: { operationId: "getOrdersByUserId", parameters: { userId: "$response.body#/id" } } }
|
||||
*/
|
||||
links?: Record<string, Link | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Callback Objects.
|
||||
*
|
||||
* @example { UserCreatedCallback: { "{$request.body#/callbackUrl}": { post: { requestBody: { description: "User created event" } } } } }
|
||||
*/
|
||||
callbacks?: Record<string, Callback | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Callback Objects.
|
||||
*
|
||||
* @example { UserCreatedCallback: { "{$request.body#/callbackUrl}": { post: { requestBody: { description: "User created event" } } } } }
|
||||
*/
|
||||
callbacks?: Record<string, Callback | Reference>;
|
||||
|
||||
/**
|
||||
* An object to hold reusable Path Item Objects.
|
||||
*
|
||||
* @example { UserPath: { get: { summary: "Get user by ID" } } }
|
||||
*/
|
||||
pathItems?: Record<string, PathItem | Reference>;
|
||||
/**
|
||||
* An object to hold reusable Path Item Objects.
|
||||
*
|
||||
* @example { UserPath: { get: { summary: "Get user by ID" } } }
|
||||
*/
|
||||
pathItems?: Record<string, PathItem | Reference>;
|
||||
}
|
||||
|
||||
@@ -83,137 +83,137 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ArraySchema extends Extension {
|
||||
/**
|
||||
* The type identifier for array schemas.
|
||||
* Must be "array".
|
||||
*/
|
||||
type: "array";
|
||||
/**
|
||||
* The type identifier for array schemas.
|
||||
* Must be "array".
|
||||
*/
|
||||
type: "array";
|
||||
|
||||
/**
|
||||
* The schema for array items.
|
||||
* All items in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
items?: unknown;
|
||||
/**
|
||||
* The schema for array items.
|
||||
* All items in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
items?: unknown;
|
||||
|
||||
/**
|
||||
* The schema for array items at specific positions.
|
||||
* Items at position i must conform to the schema at index i.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
prefixItems?: unknown[];
|
||||
/**
|
||||
* The schema for array items at specific positions.
|
||||
* Items at position i must conform to the schema at index i.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
prefixItems?: unknown[];
|
||||
|
||||
/**
|
||||
* The schema that the array must contain at least one item matching.
|
||||
* At least one item in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", enum: ["admin"] }`
|
||||
*/
|
||||
contains?: unknown;
|
||||
/**
|
||||
* The schema that the array must contain at least one item matching.
|
||||
* At least one item in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", enum: ["admin"] }`
|
||||
*/
|
||||
contains?: unknown;
|
||||
|
||||
/**
|
||||
* The minimum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minContains?: number;
|
||||
/**
|
||||
* The minimum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minContains?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
maxContains?: number;
|
||||
/**
|
||||
* The maximum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
maxContains?: number;
|
||||
|
||||
/**
|
||||
* The minimum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minItems?: number;
|
||||
/**
|
||||
* The minimum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minItems?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxItems?: number;
|
||||
/**
|
||||
* The maximum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxItems?: number;
|
||||
|
||||
/**
|
||||
* Whether array items must be unique.
|
||||
* If true, all items in the array must be unique.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
/**
|
||||
* Whether array items must be unique.
|
||||
* If true, all items in the array must be unique.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the array.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An array of allowed values for the array.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the array.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `["a", "b"]`
|
||||
*/
|
||||
const?: unknown;
|
||||
/**
|
||||
* A single allowed value for the array.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `["a", "b"]`
|
||||
*/
|
||||
const?: unknown;
|
||||
|
||||
/**
|
||||
* An example value for the array.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `["a", "b"]`
|
||||
*/
|
||||
example?: unknown[];
|
||||
/**
|
||||
* An example value for the array.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `["a", "b"]`
|
||||
*/
|
||||
example?: unknown[];
|
||||
|
||||
/**
|
||||
* An array of example values for the array.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
examples?: unknown[][];
|
||||
/**
|
||||
* An array of example values for the array.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
examples?: unknown[][];
|
||||
|
||||
/**
|
||||
* The default value for the array.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `[]`
|
||||
*/
|
||||
default?: unknown[];
|
||||
/**
|
||||
* The default value for the array.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `[]`
|
||||
*/
|
||||
default?: unknown[];
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Tags"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Tags"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Array of user tags"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Array of user tags"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "users", wrapped: true }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "users", wrapped: true }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -66,73 +66,73 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface BooleanSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for boolean schemas.
|
||||
* Must be "boolean".
|
||||
*/
|
||||
type: "boolean";
|
||||
/**
|
||||
* The type identifier for boolean schemas.
|
||||
* Must be "boolean".
|
||||
*/
|
||||
type: "boolean";
|
||||
|
||||
/**
|
||||
* An array of allowed values for the boolean.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
enum?: boolean[];
|
||||
/**
|
||||
* An array of allowed values for the boolean.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
enum?: boolean[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the boolean.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
const?: boolean;
|
||||
/**
|
||||
* A single allowed value for the boolean.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
const?: boolean;
|
||||
|
||||
/**
|
||||
* An example value for the boolean.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
example?: boolean;
|
||||
/**
|
||||
* An example value for the boolean.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
example?: boolean;
|
||||
|
||||
/**
|
||||
* An array of example values for the boolean.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
examples?: boolean[];
|
||||
/**
|
||||
* An array of example values for the boolean.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
examples?: boolean[];
|
||||
|
||||
/**
|
||||
* The default value for the boolean.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
/**
|
||||
* The default value for the boolean.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Is Active"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Is Active"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Whether the user is active"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Whether the user is active"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "isActive", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "isActive", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -84,123 +84,123 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface CompositionSchema extends Extension {
|
||||
/**
|
||||
* An array of schemas that must all be satisfied.
|
||||
* The value must conform to all schemas in the array.
|
||||
*
|
||||
* Example: `[{ type: "object" }, { properties: { name: { type: "string" } } }]`
|
||||
*/
|
||||
allOf?: unknown[];
|
||||
/**
|
||||
* An array of schemas that must all be satisfied.
|
||||
* The value must conform to all schemas in the array.
|
||||
*
|
||||
* Example: `[{ type: "object" }, { properties: { name: { type: "string" } } }]`
|
||||
*/
|
||||
allOf?: unknown[];
|
||||
|
||||
/**
|
||||
* An array of schemas where at least one must be satisfied.
|
||||
* The value must conform to at least one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
anyOf?: unknown[];
|
||||
/**
|
||||
* An array of schemas where at least one must be satisfied.
|
||||
* The value must conform to at least one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
anyOf?: unknown[];
|
||||
|
||||
/**
|
||||
* An array of schemas where exactly one must be satisfied.
|
||||
* The value must conform to exactly one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
oneOf?: unknown[];
|
||||
/**
|
||||
* An array of schemas where exactly one must be satisfied.
|
||||
* The value must conform to exactly one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
oneOf?: unknown[];
|
||||
|
||||
/**
|
||||
* A schema that must not be satisfied.
|
||||
* The value must not conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
not?: unknown;
|
||||
/**
|
||||
* A schema that must not be satisfied.
|
||||
* The value must not conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
not?: unknown;
|
||||
|
||||
/**
|
||||
* A schema for conditional validation.
|
||||
* Used with `then` and `else` for conditional logic.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { type: { const: "user" } } }`
|
||||
*/
|
||||
if?: unknown;
|
||||
/**
|
||||
* A schema for conditional validation.
|
||||
* Used with `then` and `else` for conditional logic.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { type: { const: "user" } } }`
|
||||
*/
|
||||
if?: unknown;
|
||||
|
||||
/**
|
||||
* A schema to apply if the `if` condition is met.
|
||||
* The value must conform to this schema if the `if` schema is satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { name: { type: "string" } } }`
|
||||
*/
|
||||
then?: unknown;
|
||||
/**
|
||||
* A schema to apply if the `if` condition is met.
|
||||
* The value must conform to this schema if the `if` schema is satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { name: { type: "string" } } }`
|
||||
*/
|
||||
then?: unknown;
|
||||
|
||||
/**
|
||||
* A schema to apply if the `if` condition is not met.
|
||||
* The value must conform to this schema if the `if` schema is not satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { id: { type: "string" } } }`
|
||||
*/
|
||||
else?: unknown;
|
||||
/**
|
||||
* A schema to apply if the `if` condition is not met.
|
||||
* The value must conform to this schema if the `if` schema is not satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { id: { type: "string" } } }`
|
||||
*/
|
||||
else?: unknown;
|
||||
|
||||
/**
|
||||
* An array of allowed values.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive"]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An array of allowed values.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive"]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A single allowed value.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: unknown;
|
||||
/**
|
||||
* A single allowed value.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: unknown;
|
||||
|
||||
/**
|
||||
* An example value for the composition.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"example"`
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* An example value for the composition.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"example"`
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* An array of example values.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example1", "example2"]`
|
||||
*/
|
||||
examples?: unknown[];
|
||||
/**
|
||||
* An array of example values.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example1", "example2"]`
|
||||
*/
|
||||
examples?: unknown[];
|
||||
|
||||
/**
|
||||
* The default value.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* The default value.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Composed Schema"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Composed Schema"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A schema composed of multiple schemas"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A schema composed of multiple schemas"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "composedSchema", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "composedSchema", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -75,121 +75,121 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface IntegerSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for integer schemas.
|
||||
* Must be "integer".
|
||||
*/
|
||||
type: "integer";
|
||||
/**
|
||||
* The type identifier for integer schemas.
|
||||
* Must be "integer".
|
||||
*/
|
||||
type: "integer";
|
||||
|
||||
/**
|
||||
* The format of the integer.
|
||||
* See OpenAPI 3.1.x Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"int32"`, `"int64"`
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The format of the integer.
|
||||
* See OpenAPI 3.1.x Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"int32"`, `"int64"`
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* The integer must be a multiple of this value.
|
||||
* Must be a positive integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
/**
|
||||
* The integer must be a multiple of this value.
|
||||
* Must be a positive integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the integer (inclusive).
|
||||
* The integer must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* The maximum value of the integer (inclusive).
|
||||
* The integer must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the integer (inclusive).
|
||||
* The integer must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* The minimum value of the integer (inclusive).
|
||||
* The integer must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the integer (exclusive).
|
||||
* The integer must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
/**
|
||||
* The maximum value of the integer (exclusive).
|
||||
* The integer must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the integer (exclusive).
|
||||
* The integer must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
/**
|
||||
* The minimum value of the integer (exclusive).
|
||||
* The integer must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the integer.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
/**
|
||||
* An array of allowed values for the integer.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the integer.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
/**
|
||||
* A single allowed value for the integer.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
|
||||
/**
|
||||
* An example value for the integer.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
example?: number;
|
||||
/**
|
||||
* An example value for the integer.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
example?: number;
|
||||
|
||||
/**
|
||||
* An array of example values for the integer.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1, 2, 3]`
|
||||
*/
|
||||
examples?: number[];
|
||||
/**
|
||||
* An array of example values for the integer.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1, 2, 3]`
|
||||
*/
|
||||
examples?: number[];
|
||||
|
||||
/**
|
||||
* The default value for the integer.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
/**
|
||||
* The default value for the integer.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User ID"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User ID"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The unique identifier of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The unique identifier of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "userId", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "userId", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -57,52 +57,52 @@ import type { Extension } from "../extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface NullSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for null schemas. This field is required.
|
||||
*
|
||||
* @example "null"
|
||||
*/
|
||||
type: "null";
|
||||
/**
|
||||
* The type identifier for null schemas. This field is required.
|
||||
*
|
||||
* @example "null"
|
||||
*/
|
||||
type: "null";
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Null Value"
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
*
|
||||
* @example "Null Value"
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Represents a null value"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "Represents a null value"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example null
|
||||
*/
|
||||
default?: null;
|
||||
/**
|
||||
* The default value for the schema.
|
||||
*
|
||||
* @example null
|
||||
*/
|
||||
default?: null;
|
||||
|
||||
/**
|
||||
* An array of example values.
|
||||
*
|
||||
* @example [null]
|
||||
*/
|
||||
examples?: null[];
|
||||
/**
|
||||
* An array of example values.
|
||||
*
|
||||
* @example [null]
|
||||
*/
|
||||
examples?: null[];
|
||||
|
||||
/**
|
||||
* An enumeration of allowed values. For null schemas, this should contain only null.
|
||||
*
|
||||
* @example [null]
|
||||
*/
|
||||
enum?: null[];
|
||||
/**
|
||||
* An enumeration of allowed values. For null schemas, this should contain only null.
|
||||
*
|
||||
* @example [null]
|
||||
*/
|
||||
enum?: null[];
|
||||
|
||||
/**
|
||||
* A constant allowed value. For null schemas, this should be null.
|
||||
*
|
||||
* @example null
|
||||
*/
|
||||
const?: null;
|
||||
/**
|
||||
* A constant allowed value. For null schemas, this should be null.
|
||||
*
|
||||
* @example null
|
||||
*/
|
||||
const?: null;
|
||||
}
|
||||
|
||||
@@ -75,121 +75,121 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface NumberSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for number schemas.
|
||||
* Must be "number".
|
||||
*/
|
||||
type: "number";
|
||||
/**
|
||||
* The type identifier for number schemas.
|
||||
* Must be "number".
|
||||
*/
|
||||
type: "number";
|
||||
|
||||
/**
|
||||
* The format of the number.
|
||||
* See OpenAPI 3.1.x Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"float"`, `"double"`
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The format of the number.
|
||||
* See OpenAPI 3.1.x Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"float"`, `"double"`
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* The number must be a multiple of this value.
|
||||
* Must be a positive number.
|
||||
*
|
||||
* Example: `0.5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
/**
|
||||
* The number must be a multiple of this value.
|
||||
* Must be a positive number.
|
||||
*
|
||||
* Example: `0.5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the number (inclusive).
|
||||
* The number must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* The maximum value of the number (inclusive).
|
||||
* The number must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the number (inclusive).
|
||||
* The number must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* The minimum value of the number (inclusive).
|
||||
* The number must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the number (exclusive).
|
||||
* The number must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
/**
|
||||
* The maximum value of the number (exclusive).
|
||||
* The number must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the number (exclusive).
|
||||
* The number must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
/**
|
||||
* The minimum value of the number (exclusive).
|
||||
* The number must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the number.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
/**
|
||||
* An array of allowed values for the number.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the number.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
/**
|
||||
* A single allowed value for the number.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
|
||||
/**
|
||||
* An example value for the number.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
example?: number;
|
||||
/**
|
||||
* An example value for the number.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
example?: number;
|
||||
|
||||
/**
|
||||
* An array of example values for the number.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1.5, 2.7, 3.14]`
|
||||
*/
|
||||
examples?: number[];
|
||||
/**
|
||||
* An array of example values for the number.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1.5, 2.7, 3.14]`
|
||||
*/
|
||||
examples?: number[];
|
||||
|
||||
/**
|
||||
* The default value for the number.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
/**
|
||||
* The default value for the number.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Price"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Price"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The price of the item"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The price of the item"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "price", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "price", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -88,147 +88,147 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ObjectSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for object schemas.
|
||||
* Must be "object".
|
||||
*/
|
||||
type: "object";
|
||||
/**
|
||||
* The type identifier for object schemas.
|
||||
* Must be "object".
|
||||
*/
|
||||
type: "object";
|
||||
|
||||
/**
|
||||
* A map of property names to their schemas.
|
||||
* Each property in the object must conform to its corresponding schema.
|
||||
*
|
||||
* Example: `{ name: { type: "string" }, age: { type: "number" } }`
|
||||
*/
|
||||
properties?: Record<string, unknown>;
|
||||
/**
|
||||
* A map of property names to their schemas.
|
||||
* Each property in the object must conform to its corresponding schema.
|
||||
*
|
||||
* Example: `{ name: { type: "string" }, age: { type: "number" } }`
|
||||
*/
|
||||
properties?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* An array of required property names.
|
||||
* These properties must be present in the object.
|
||||
*
|
||||
* Example: `["name", "email"]`
|
||||
*/
|
||||
required?: string[];
|
||||
/**
|
||||
* An array of required property names.
|
||||
* These properties must be present in the object.
|
||||
*
|
||||
* Example: `["name", "email"]`
|
||||
*/
|
||||
required?: string[];
|
||||
|
||||
/**
|
||||
* The schema for additional properties not defined in properties.
|
||||
* If false, no additional properties are allowed.
|
||||
* If true, any additional properties are allowed.
|
||||
* If a schema, additional properties must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }` or `false` or `true`
|
||||
*/
|
||||
additionalProperties?: unknown | boolean;
|
||||
/**
|
||||
* The schema for additional properties not defined in properties.
|
||||
* If false, no additional properties are allowed.
|
||||
* If true, any additional properties are allowed.
|
||||
* If a schema, additional properties must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }` or `false` or `true`
|
||||
*/
|
||||
additionalProperties?: unknown | boolean;
|
||||
|
||||
/**
|
||||
* A map of regex patterns to schemas.
|
||||
* Properties whose names match a pattern must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ "^S_": { type: "string" } }`
|
||||
*/
|
||||
patternProperties?: Record<string, unknown>;
|
||||
/**
|
||||
* A map of regex patterns to schemas.
|
||||
* Properties whose names match a pattern must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ "^S_": { type: "string" } }`
|
||||
*/
|
||||
patternProperties?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* The schema for property names.
|
||||
* All property names in the object must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", pattern: "^[A-Za-z][A-Za-z0-9]*$" }`
|
||||
*/
|
||||
propertyNames?: unknown;
|
||||
/**
|
||||
* The schema for property names.
|
||||
* All property names in the object must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", pattern: "^[A-Za-z][A-Za-z0-9]*$" }`
|
||||
*/
|
||||
propertyNames?: unknown;
|
||||
|
||||
/**
|
||||
* The minimum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minProperties?: number;
|
||||
/**
|
||||
* The minimum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minProperties?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxProperties?: number;
|
||||
/**
|
||||
* The maximum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxProperties?: number;
|
||||
|
||||
/**
|
||||
* A map of property names to arrays of required properties.
|
||||
* If a property is present, the properties in its array must also be present.
|
||||
*
|
||||
* Example: `{ credit_card: ["billing_address"] }`
|
||||
*/
|
||||
dependentRequired?: Record<string, string[]>;
|
||||
/**
|
||||
* A map of property names to arrays of required properties.
|
||||
* If a property is present, the properties in its array must also be present.
|
||||
*
|
||||
* Example: `{ credit_card: ["billing_address"] }`
|
||||
*/
|
||||
dependentRequired?: Record<string, string[]>;
|
||||
|
||||
/**
|
||||
* A map of property names to schemas.
|
||||
* If a property is present, the object must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ credit_card: { type: "object", properties: { number: { type: "string" } } } }`
|
||||
*/
|
||||
dependentSchemas?: Record<string, unknown>;
|
||||
/**
|
||||
* A map of property names to schemas.
|
||||
* If a property is present, the object must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ credit_card: { type: "object", properties: { number: { type: "string" } } } }`
|
||||
*/
|
||||
dependentSchemas?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the object.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[{ name: "John" }, { name: "Jane" }]`
|
||||
*/
|
||||
enum?: Record<string, unknown>[];
|
||||
/**
|
||||
* An array of allowed values for the object.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[{ name: "John" }, { name: "Jane" }]`
|
||||
*/
|
||||
enum?: Record<string, unknown>[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the object.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `{ name: "John" }`
|
||||
*/
|
||||
const?: Record<string, unknown>;
|
||||
/**
|
||||
* A single allowed value for the object.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `{ name: "John" }`
|
||||
*/
|
||||
const?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* An example value for the object.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `{ name: "John" }`
|
||||
*/
|
||||
example?: Record<string, unknown>;
|
||||
/**
|
||||
* An example value for the object.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `{ name: "John" }`
|
||||
*/
|
||||
example?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* An array of example values for the object.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[{ name: "John", age: 30 }]`
|
||||
*/
|
||||
examples?: Record<string, unknown>[];
|
||||
/**
|
||||
* An array of example values for the object.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[{ name: "John", age: 30 }]`
|
||||
*/
|
||||
examples?: Record<string, unknown>[];
|
||||
|
||||
/**
|
||||
* The default value for the object.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `{}`
|
||||
*/
|
||||
default?: Record<string, unknown>;
|
||||
/**
|
||||
* The default value for the object.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `{}`
|
||||
*/
|
||||
default?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A user object"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A user object"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "user", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "user", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -53,19 +53,19 @@ import type { Extension } from "../extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ReferenceSchema extends Extension {
|
||||
/**
|
||||
* A reference to a schema. This MUST be in the form of a URI.
|
||||
* When present, no other properties except `description` and extensions are allowed.
|
||||
*
|
||||
* Example: `"#/components/schemas/User"`
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* A reference to a schema. This MUST be in the form of a URI.
|
||||
* When present, no other properties except `description` and extensions are allowed.
|
||||
*
|
||||
* Example: `"#/components/schemas/User"`
|
||||
*/
|
||||
$ref: string;
|
||||
|
||||
/**
|
||||
* A description of the referenced schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Reference to a user schema"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the referenced schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Reference to a user schema"`
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@@ -84,121 +84,121 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface StringSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for string schemas.
|
||||
* Must be "string".
|
||||
*/
|
||||
type: "string";
|
||||
/**
|
||||
* The type identifier for string schemas.
|
||||
* Must be "string".
|
||||
*/
|
||||
type: "string";
|
||||
|
||||
/**
|
||||
* The format of the string.
|
||||
* See OpenAPI 3.1.x Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"email"`, `"date-time"`, `"uuid"`
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The format of the string.
|
||||
* See OpenAPI 3.1.x Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"email"`, `"date-time"`, `"uuid"`
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* The maximum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `255`
|
||||
*/
|
||||
maxLength?: number;
|
||||
/**
|
||||
* The maximum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `255`
|
||||
*/
|
||||
maxLength?: number;
|
||||
|
||||
/**
|
||||
* The minimum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minLength?: number;
|
||||
/**
|
||||
* The minimum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minLength?: number;
|
||||
|
||||
/**
|
||||
* A regular expression pattern that the string must match.
|
||||
* Should be a valid ECMA 262 regular expression.
|
||||
*
|
||||
* Example: `"^[A-Za-z0-9]+$"`
|
||||
*/
|
||||
pattern?: string;
|
||||
/**
|
||||
* A regular expression pattern that the string must match.
|
||||
* Should be a valid ECMA 262 regular expression.
|
||||
*
|
||||
* Example: `"^[A-Za-z0-9]+$"`
|
||||
*/
|
||||
pattern?: string;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the string.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive", "pending"]`
|
||||
*/
|
||||
enum?: string[];
|
||||
/**
|
||||
* An array of allowed values for the string.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive", "pending"]`
|
||||
*/
|
||||
enum?: string[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the string.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: string;
|
||||
/**
|
||||
* A single allowed value for the string.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: string;
|
||||
|
||||
/**
|
||||
* An example value for the string.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"example@email.com"`
|
||||
*/
|
||||
example?: string;
|
||||
/**
|
||||
* An example value for the string.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"example@email.com"`
|
||||
*/
|
||||
example?: string;
|
||||
|
||||
/**
|
||||
* An array of example values for the string.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example@email.com", "test@domain.com"]`
|
||||
*/
|
||||
examples?: string[];
|
||||
/**
|
||||
* An array of example values for the string.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example@email.com", "test@domain.com"]`
|
||||
*/
|
||||
examples?: string[];
|
||||
|
||||
/**
|
||||
* The default value for the string.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: string;
|
||||
/**
|
||||
* The default value for the string.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Email"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Email"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The email address of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The email address of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The media type of the content. This is used to specify the media type
|
||||
* of the content when the string represents encoded content.
|
||||
*
|
||||
* Example: `"image/png"`, `"application/json"`
|
||||
*/
|
||||
contentMediaType?: string;
|
||||
/**
|
||||
* The media type of the content. This is used to specify the media type
|
||||
* of the content when the string represents encoded content.
|
||||
*
|
||||
* Example: `"image/png"`, `"application/json"`
|
||||
*/
|
||||
contentMediaType?: string;
|
||||
|
||||
/**
|
||||
* The encoding of the content. This is used to specify how the content
|
||||
* is encoded when the string represents encoded content.
|
||||
*
|
||||
* Example: `"base64"`, `"base64url"`, `"quoted-printable"`
|
||||
*/
|
||||
contentEncoding?: string;
|
||||
/**
|
||||
* The encoding of the content. This is used to specify how the content
|
||||
* is encoded when the string represents encoded content.
|
||||
*
|
||||
* Example: `"base64"`, `"base64url"`, `"quoted-printable"`
|
||||
*/
|
||||
contentEncoding?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "userName", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions.
|
||||
*
|
||||
* Example: `{ name: "userName", attribute: false }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
* ```
|
||||
*/
|
||||
export interface Extension {
|
||||
/**
|
||||
* Specification Extensions allow adding custom properties to OpenAPI objects.
|
||||
* All extension properties must start with `x-` and can contain any valid JSON value.
|
||||
*
|
||||
* @example "x-custom-property"
|
||||
* @example "x-internal-id"
|
||||
* @example "x-codegen-settings"
|
||||
*/
|
||||
[key: `x-${string}`]: unknown;
|
||||
/**
|
||||
* Specification Extensions allow adding custom properties to OpenAPI objects.
|
||||
* All extension properties must start with `x-` and can contain any valid JSON value.
|
||||
*
|
||||
* @example "x-custom-property"
|
||||
* @example "x-internal-id"
|
||||
* @example "x-codegen-settings"
|
||||
*/
|
||||
[key: `x-${string}`]: unknown;
|
||||
}
|
||||
|
||||
@@ -43,21 +43,21 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ExternalDocumentation extends Extension {
|
||||
/**
|
||||
* A short description of the target documentation. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "Find out more about our API"
|
||||
* @example "Additional documentation for this endpoint"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the target documentation. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "Find out more about our API"
|
||||
* @example "Additional documentation for this endpoint"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The URL for the target documentation. This field is required and MUST be in the
|
||||
* format of a URL.
|
||||
*
|
||||
* @example "https://example.com/docs"
|
||||
* @example "https://docs.example.com/api"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The URL for the target documentation. This field is required and MUST be in the
|
||||
* format of a URL.
|
||||
*
|
||||
* @example "https://example.com/docs"
|
||||
* @example "https://docs.example.com/api"
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
47
3.1/index.ts
47
3.1/index.ts
@@ -24,14 +24,14 @@ export type { Components } from "./components";
|
||||
* @see {@link https://spec.openapis.org/oas/v3.1.1#data-type-object | OpenAPI 3.1.1 Data Type Object}
|
||||
*/
|
||||
export type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
/**
|
||||
* Core extension and reference types.
|
||||
@@ -67,18 +67,18 @@ export type { Contact, Info, License } from "./info";
|
||||
* @see {@link https://spec.openapis.org/oas/v3.1.1#callback-object | OpenAPI 3.1.1 Callback Object}
|
||||
*/
|
||||
export type {
|
||||
Callback,
|
||||
Encoding,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
MediaType,
|
||||
Operation,
|
||||
Parameter,
|
||||
PathItem,
|
||||
Paths,
|
||||
RequestBody,
|
||||
Response,
|
||||
Callback,
|
||||
Encoding,
|
||||
Example,
|
||||
Header,
|
||||
Link,
|
||||
MediaType,
|
||||
Operation,
|
||||
Parameter,
|
||||
PathItem,
|
||||
Paths,
|
||||
RequestBody,
|
||||
Response,
|
||||
} from "./paths";
|
||||
export type { Reference } from "./references";
|
||||
|
||||
@@ -97,12 +97,7 @@ export type { Discriminator, Schema } from "./schema";
|
||||
* @see {@link https://spec.openapis.org/oas/v3.1.1#oauth-flow-object | OpenAPI 3.1.1 OAuth Flow Object}
|
||||
* @see {@link https://spec.openapis.org/oas/v3.1.1#security-requirement-object | OpenAPI 3.1.1 Security Requirement Object}
|
||||
*/
|
||||
export type {
|
||||
OAuthFlow,
|
||||
OAuthFlows,
|
||||
SecurityRequirement,
|
||||
SecurityScheme,
|
||||
} from "./security";
|
||||
export type { OAuthFlow, OAuthFlows, SecurityRequirement, SecurityScheme } from "./security";
|
||||
/**
|
||||
* Server configuration types.
|
||||
*
|
||||
|
||||
186
3.1/info.ts
186
3.1/info.ts
@@ -62,59 +62,59 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Info extends Extension {
|
||||
/**
|
||||
* The title of the API. This field is required.
|
||||
*
|
||||
* @example "Pet Store API"
|
||||
* @example "User Management API"
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* The title of the API. This field is required.
|
||||
*
|
||||
* @example "Pet Store API"
|
||||
* @example "User Management API"
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* A short summary of the API.
|
||||
*
|
||||
* @example "A sample API that uses a petstore as an example"
|
||||
* @example "API for managing users and their data"
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* A short summary of the API.
|
||||
*
|
||||
* @example "A sample API that uses a petstore as an example"
|
||||
* @example "API for managing users and their data"
|
||||
*/
|
||||
summary?: string;
|
||||
|
||||
/**
|
||||
* A description of the API. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "This is a sample server Petstore server."
|
||||
* @example "This API provides endpoints for user management, authentication, and data operations."
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the API. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "This is a sample server Petstore server."
|
||||
* @example "This API provides endpoints for user management, authentication, and data operations."
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A URL to the Terms of Service for the API. MUST be in the format of a URL.
|
||||
*
|
||||
* @example "http://example.com/terms/"
|
||||
* @example "https://www.example.com/terms-of-service"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
/**
|
||||
* A URL to the Terms of Service for the API. MUST be in the format of a URL.
|
||||
*
|
||||
* @example "http://example.com/terms/"
|
||||
* @example "https://www.example.com/terms-of-service"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "https://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "https://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
|
||||
/**
|
||||
* The version of the OpenAPI document. This field is required.
|
||||
*
|
||||
* @example "1.0.0"
|
||||
* @example "2.1.3"
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* The version of the OpenAPI document. This field is required.
|
||||
*
|
||||
* @example "1.0.0"
|
||||
* @example "2.1.3"
|
||||
*/
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -163,29 +163,29 @@ export interface Info extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Contact extends Extension {
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "Development Team"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "Development Team"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URL pointing to the contact information. MUST be in the format of a URL.
|
||||
*
|
||||
* @example "http://www.example.com/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* The URL pointing to the contact information. MUST be in the format of a URL.
|
||||
*
|
||||
* @example "http://www.example.com/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* The email address of the contact person/organization. MUST be in the format of an email address.
|
||||
*
|
||||
* @example "support@example.com"
|
||||
* @example "dev@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* The email address of the contact person/organization. MUST be in the format of an email address.
|
||||
*
|
||||
* @example "support@example.com"
|
||||
* @example "dev@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,31 +233,31 @@ export interface Contact extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface License extends Extension {
|
||||
/**
|
||||
* The license name used for the API. This field is required.
|
||||
*
|
||||
* @example "Apache 2.0"
|
||||
* @example "MIT"
|
||||
* @example "GPL-3.0"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The license name used for the API. This field is required.
|
||||
*
|
||||
* @example "Apache 2.0"
|
||||
* @example "MIT"
|
||||
* @example "GPL-3.0"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* An SPDX license expression for the API. The `identifier` field is mutually
|
||||
* exclusive of the `url` field.
|
||||
*
|
||||
* @example "Apache-2.0"
|
||||
* @example "MIT"
|
||||
* @example "GPL-3.0"
|
||||
*/
|
||||
identifier?: string;
|
||||
/**
|
||||
* An SPDX license expression for the API. The `identifier` field is mutually
|
||||
* exclusive of the `url` field.
|
||||
*
|
||||
* @example "Apache-2.0"
|
||||
* @example "MIT"
|
||||
* @example "GPL-3.0"
|
||||
*/
|
||||
identifier?: string;
|
||||
|
||||
/**
|
||||
* A URL to the license used for the API. MUST be in the format of a URL.
|
||||
* The `url` field is mutually exclusive of the `identifier` field.
|
||||
*
|
||||
* @example "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
* @example "https://opensource.org/licenses/MIT"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A URL to the license used for the API. MUST be in the format of a URL.
|
||||
* The `url` field is mutually exclusive of the `identifier` field.
|
||||
*
|
||||
* @example "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
* @example "https://opensource.org/licenses/MIT"
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
1208
3.1/paths.ts
1208
3.1/paths.ts
File diff suppressed because it is too large
Load Diff
@@ -55,31 +55,31 @@
|
||||
* ```
|
||||
*/
|
||||
export interface Reference {
|
||||
/**
|
||||
* The reference string. This field is required and must be a valid JSON Reference.
|
||||
* It can reference internal components using `#/` or external resources using URLs.
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "https://example.com/schemas/User.json"
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* The reference string. This field is required and must be a valid JSON Reference.
|
||||
* It can reference internal components using `#/` or external resources using URLs.
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "https://example.com/schemas/User.json"
|
||||
*/
|
||||
$ref: string;
|
||||
|
||||
/**
|
||||
* A description of the referenced object. This can be used to provide
|
||||
* additional context about what the referenced object represents.
|
||||
*
|
||||
* @example "A user object containing user information"
|
||||
* @example "Standard error response for not found resources"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the referenced object. This can be used to provide
|
||||
* additional context about what the referenced object represents.
|
||||
*
|
||||
* @example "A user object containing user information"
|
||||
* @example "Standard error response for not found resources"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A short summary of the referenced object. This can be used to provide
|
||||
* a brief overview of what the referenced object represents.
|
||||
*
|
||||
* @example "User schema"
|
||||
* @example "Not found response"
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* A short summary of the referenced object. This can be used to provide
|
||||
* a brief overview of what the referenced object represents.
|
||||
*
|
||||
* @example "User schema"
|
||||
* @example "Not found response"
|
||||
*/
|
||||
summary?: string;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NullSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NullSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
import type { Extension } from "./extensions";
|
||||
|
||||
@@ -58,21 +58,21 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Discriminator extends Extension {
|
||||
/**
|
||||
* The name of the property in the payload that will hold the discriminator value.
|
||||
* This property must be present in the payload.
|
||||
*
|
||||
* Example: `"petType"`
|
||||
*/
|
||||
propertyName: string;
|
||||
/**
|
||||
* The name of the property in the payload that will hold the discriminator value.
|
||||
* This property must be present in the payload.
|
||||
*
|
||||
* Example: `"petType"`
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* An object to hold mappings between payload values and schema names or references.
|
||||
* If not provided, the schema name will be used as the discriminator value.
|
||||
*
|
||||
* Example: `{ dog: "#/components/schemas/Dog", cat: "#/components/schemas/Cat" }`
|
||||
*/
|
||||
mapping?: Record<string, string>;
|
||||
/**
|
||||
* An object to hold mappings between payload values and schema names or references.
|
||||
* If not provided, the schema name will be used as the discriminator value.
|
||||
*
|
||||
* Example: `{ dog: "#/components/schemas/Dog", cat: "#/components/schemas/Cat" }`
|
||||
*/
|
||||
mapping?: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,12 +243,12 @@ export interface Discriminator extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export type Schema =
|
||||
| ReferenceSchema
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| NullSchema
|
||||
| CompositionSchema;
|
||||
| ReferenceSchema
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| NullSchema
|
||||
| CompositionSchema;
|
||||
|
||||
258
3.1/security.ts
258
3.1/security.ts
@@ -79,80 +79,80 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityScheme extends Extension {
|
||||
/**
|
||||
* The type of the security scheme. This field is required.
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "http"
|
||||
* @example "mutualTLS"
|
||||
* @example "oauth2"
|
||||
* @example "openIdConnect"
|
||||
*/
|
||||
type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
|
||||
/**
|
||||
* The type of the security scheme. This field is required.
|
||||
*
|
||||
* @example "apiKey"
|
||||
* @example "http"
|
||||
* @example "mutualTLS"
|
||||
* @example "oauth2"
|
||||
* @example "openIdConnect"
|
||||
*/
|
||||
type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
|
||||
|
||||
/**
|
||||
* A short description for security scheme. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "API key authentication"
|
||||
* @example "OAuth2 authentication with authorization code flow"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for security scheme. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "API key authentication"
|
||||
* @example "OAuth2 authentication with authorization code flow"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The name of the header, query or cookie parameter to be used. This field
|
||||
* is required for `apiKey` type.
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "api_key"
|
||||
* @example "sessionId"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The name of the header, query or cookie parameter to be used. This field
|
||||
* is required for `apiKey` type.
|
||||
*
|
||||
* @example "X-API-Key"
|
||||
* @example "api_key"
|
||||
* @example "sessionId"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The location of the API key. This field is required for `apiKey` type.
|
||||
*
|
||||
* @example "header"
|
||||
* @example "query"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in?: "query" | "header" | "cookie";
|
||||
/**
|
||||
* The location of the API key. This field is required for `apiKey` type.
|
||||
*
|
||||
* @example "header"
|
||||
* @example "query"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in?: "query" | "header" | "cookie";
|
||||
|
||||
/**
|
||||
* The name of the HTTP Authorization scheme to be used in the Authorization
|
||||
* header. This field is required for `http` type.
|
||||
*
|
||||
* @example "basic"
|
||||
* @example "bearer"
|
||||
* @example "digest"
|
||||
*/
|
||||
scheme?: string;
|
||||
/**
|
||||
* The name of the HTTP Authorization scheme to be used in the Authorization
|
||||
* header. This field is required for `http` type.
|
||||
*
|
||||
* @example "basic"
|
||||
* @example "bearer"
|
||||
* @example "digest"
|
||||
*/
|
||||
scheme?: string;
|
||||
|
||||
/**
|
||||
* A hint to the client to identify how the bearer token is formatted. Bearer
|
||||
* tokens are usually generated by an authorization server, so this information
|
||||
* is primarily for documentation purposes.
|
||||
*
|
||||
* @example "JWT"
|
||||
* @example "Bearer"
|
||||
*/
|
||||
bearerFormat?: string;
|
||||
/**
|
||||
* A hint to the client to identify how the bearer token is formatted. Bearer
|
||||
* tokens are usually generated by an authorization server, so this information
|
||||
* is primarily for documentation purposes.
|
||||
*
|
||||
* @example "JWT"
|
||||
* @example "Bearer"
|
||||
*/
|
||||
bearerFormat?: string;
|
||||
|
||||
/**
|
||||
* An object containing configuration information for the flow types supported.
|
||||
* This field is required for `oauth2` type.
|
||||
*
|
||||
* @example { authorizationCode: { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token" } }
|
||||
*/
|
||||
flows?: OAuthFlows;
|
||||
/**
|
||||
* An object containing configuration information for the flow types supported.
|
||||
* This field is required for `oauth2` type.
|
||||
*
|
||||
* @example { authorizationCode: { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token" } }
|
||||
*/
|
||||
flows?: OAuthFlows;
|
||||
|
||||
/**
|
||||
* OpenId Connect URL to discover OAuth2 configuration values. This MUST be
|
||||
* in the form of a URL. This field is required for `openIdConnect` type.
|
||||
*
|
||||
* @example "https://example.com/.well-known/openid_configuration"
|
||||
*/
|
||||
openIdConnectUrl?: string;
|
||||
/**
|
||||
* OpenId Connect URL to discover OAuth2 configuration values. This MUST be
|
||||
* in the form of a URL. This field is required for `openIdConnect` type.
|
||||
*
|
||||
* @example "https://example.com/.well-known/openid_configuration"
|
||||
*/
|
||||
openIdConnectUrl?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -199,33 +199,33 @@ export interface SecurityScheme extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlows extends Extension {
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
*
|
||||
* @example { tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
*
|
||||
* @example { authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { "read:pets": "read your pets" } }
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -270,36 +270,36 @@ export interface OAuthFlows extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlow extends Extension {
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `implicit` and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
/**
|
||||
* The authorization URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `implicit` and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/authorize"
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
|
||||
/**
|
||||
* The token URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `password`, `clientCredentials`, and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
/**
|
||||
* The token URL to be used for this flow. This MUST be in the form of a URL.
|
||||
* This field is required for `password`, `clientCredentials`, and `authorizationCode` flows.
|
||||
*
|
||||
* @example "https://example.com/oauth/token"
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
|
||||
*
|
||||
* @example "https://example.com/oauth/refresh"
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL.
|
||||
*
|
||||
* @example "https://example.com/oauth/refresh"
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. A map between the scope
|
||||
* name and a short description for it. This field is required.
|
||||
*
|
||||
* @example { "read:pets": "read your pets", "write:pets": "modify pets in your account" }
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
/**
|
||||
* The available scopes for the OAuth2 security scheme. A map between the scope
|
||||
* name and a short description for it. This field is required.
|
||||
*
|
||||
* @example { "read:pets": "read your pets", "write:pets": "modify pets in your account" }
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -352,15 +352,15 @@ export interface OAuthFlow extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface SecurityRequirement {
|
||||
/**
|
||||
* Each name MUST correspond to a security scheme which is declared in the
|
||||
* Security Schemes under the Components Object. The value is an array of
|
||||
* scope names required for the execution. For OAuth2, the scopes are the
|
||||
* scopes required for the execution. For other security schemes, the array
|
||||
* MUST be empty.
|
||||
*
|
||||
* @example []
|
||||
* @example ["write:pets", "read:pets"]
|
||||
*/
|
||||
[name: string]: string[];
|
||||
/**
|
||||
* Each name MUST correspond to a security scheme which is declared in the
|
||||
* Security Schemes under the Components Object. The value is an array of
|
||||
* scope names required for the execution. For OAuth2, the scopes are the
|
||||
* scopes required for the execution. For other security schemes, the array
|
||||
* MUST be empty.
|
||||
*
|
||||
* @example []
|
||||
* @example ["write:pets", "read:pets"]
|
||||
*/
|
||||
[name: string]: string[];
|
||||
}
|
||||
|
||||
106
3.1/servers.ts
106
3.1/servers.ts
@@ -57,34 +57,34 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Server extends Extension {
|
||||
/**
|
||||
* A URL to the target host. This URL supports Server Variables and MAY be relative,
|
||||
* to indicate that the host location is relative to the location where the OpenAPI
|
||||
* document is being served. Variable substitutions will be made when a variable
|
||||
* is named in `{brackets}`.
|
||||
*
|
||||
* @example "https://api.example.com/v1"
|
||||
* @example "https://{username}.gigantic-server.com:{port}/{basePath}"
|
||||
* @example "/v1"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A URL to the target host. This URL supports Server Variables and MAY be relative,
|
||||
* to indicate that the host location is relative to the location where the OpenAPI
|
||||
* document is being served. Variable substitutions will be made when a variable
|
||||
* is named in `{brackets}`.
|
||||
*
|
||||
* @example "https://api.example.com/v1"
|
||||
* @example "https://{username}.gigantic-server.com:{port}/{basePath}"
|
||||
* @example "/v1"
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* An optional string describing the host designated by the URL. CommonMark syntax
|
||||
* MAY be used for rich text representation.
|
||||
*
|
||||
* @example "The production API server"
|
||||
* @example "The staging API server"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional string describing the host designated by the URL. CommonMark syntax
|
||||
* MAY be used for rich text representation.
|
||||
*
|
||||
* @example "The production API server"
|
||||
* @example "The staging API server"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A map between a variable name and its value. The value is used for substitution
|
||||
* in the server's URL template.
|
||||
*
|
||||
* @example { username: { default: "demo" }, port: { default: "8443" } }
|
||||
*/
|
||||
variables?: Record<string, ServerVariable>;
|
||||
/**
|
||||
* A map between a variable name and its value. The value is used for substitution
|
||||
* in the server's URL template.
|
||||
*
|
||||
* @example { username: { default: "demo" }, port: { default: "8443" } }
|
||||
*/
|
||||
variables?: Record<string, ServerVariable>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,33 +132,33 @@ export interface Server extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface ServerVariable extends Extension {
|
||||
/**
|
||||
* An enumeration of string values to be used if the substitution options are
|
||||
* from a limited set. The array SHOULD NOT be empty.
|
||||
*
|
||||
* @example ["8443", "443"]
|
||||
* @example ["v1", "v2", "v3"]
|
||||
*/
|
||||
enum?: string[];
|
||||
/**
|
||||
* An enumeration of string values to be used if the substitution options are
|
||||
* from a limited set. The array SHOULD NOT be empty.
|
||||
*
|
||||
* @example ["8443", "443"]
|
||||
* @example ["v1", "v2", "v3"]
|
||||
*/
|
||||
enum?: string[];
|
||||
|
||||
/**
|
||||
* The default value to use for substitution, which SHALL be sent if an alternate
|
||||
* value is not supplied. Note this behavior is different than the Schema Object's
|
||||
* treatment of default values, because in those cases parameter values are optional.
|
||||
* If the enum is defined, the value SHOULD exist in the enum's values.
|
||||
*
|
||||
* @example "demo"
|
||||
* @example "8443"
|
||||
* @example "v1"
|
||||
*/
|
||||
default: string;
|
||||
/**
|
||||
* The default value to use for substitution, which SHALL be sent if an alternate
|
||||
* value is not supplied. Note this behavior is different than the Schema Object's
|
||||
* treatment of default values, because in those cases parameter values are optional.
|
||||
* If the enum is defined, the value SHOULD exist in the enum's values.
|
||||
*
|
||||
* @example "demo"
|
||||
* @example "8443"
|
||||
* @example "v1"
|
||||
*/
|
||||
default: string;
|
||||
|
||||
/**
|
||||
* An optional description for the server variable. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "this value is assigned by the service provider"
|
||||
* @example "The port number"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional description for the server variable. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "this value is assigned by the service provider"
|
||||
* @example "The port number"
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
156
3.1/spec.ts
156
3.1/spec.ts
@@ -119,91 +119,91 @@ import type { Webhooks } from "./webhooks";
|
||||
* ```
|
||||
*/
|
||||
export interface Specification extends Extension {
|
||||
/**
|
||||
* This string MUST be the version number of the OpenAPI Specification that the
|
||||
* OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret
|
||||
* the OpenAPI document. This is not related to the API `info.version` string.
|
||||
* This field is required.
|
||||
*
|
||||
* @example "3.1.0"
|
||||
* @example "3.1.1"
|
||||
*/
|
||||
openapi: string;
|
||||
/**
|
||||
* This string MUST be the version number of the OpenAPI Specification that the
|
||||
* OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret
|
||||
* the OpenAPI document. This is not related to the API `info.version` string.
|
||||
* This field is required.
|
||||
*
|
||||
* @example "3.1.0"
|
||||
* @example "3.1.1"
|
||||
*/
|
||||
openapi: string;
|
||||
|
||||
/**
|
||||
* Provides metadata about the API. The metadata MAY be used by tooling as required.
|
||||
* This field is required.
|
||||
*
|
||||
* @example { title: "Pet Store API", version: "1.0.0" }
|
||||
*/
|
||||
info: Info;
|
||||
/**
|
||||
* Provides metadata about the API. The metadata MAY be used by tooling as required.
|
||||
* This field is required.
|
||||
*
|
||||
* @example { title: "Pet Store API", version: "1.0.0" }
|
||||
*/
|
||||
info: Info;
|
||||
|
||||
/**
|
||||
* The default value for the `$schema` keyword within Schema Objects contained
|
||||
* within this OAS document. This MUST be in the form of a URI.
|
||||
*
|
||||
* @example "https://json-schema.org/draft/2020-12/schema"
|
||||
*/
|
||||
jsonSchemaDialect?: string;
|
||||
/**
|
||||
* The default value for the `$schema` keyword within Schema Objects contained
|
||||
* within this OAS document. This MUST be in the form of a URI.
|
||||
*
|
||||
* @example "https://json-schema.org/draft/2020-12/schema"
|
||||
*/
|
||||
jsonSchemaDialect?: string;
|
||||
|
||||
/**
|
||||
* An array of Server Objects, which provide connectivity information to a target
|
||||
* server. If the `servers` property is not provided, or is an empty array, the
|
||||
* default value would be a Server Object with a `url` value of `/`.
|
||||
*
|
||||
* @example [{ url: "https://api.example.com/v1", description: "The production API server" }]
|
||||
*/
|
||||
servers?: Server[];
|
||||
/**
|
||||
* An array of Server Objects, which provide connectivity information to a target
|
||||
* server. If the `servers` property is not provided, or is an empty array, the
|
||||
* default value would be a Server Object with a `url` value of `/`.
|
||||
*
|
||||
* @example [{ url: "https://api.example.com/v1", description: "The production API server" }]
|
||||
*/
|
||||
servers?: Server[];
|
||||
|
||||
/**
|
||||
* The available paths and operations for the API.
|
||||
*
|
||||
* @example { "/pets": { "get": { "summary": "List all pets", "responses": { "200": { "description": "A list of pets" } } } } }
|
||||
*/
|
||||
paths?: Paths;
|
||||
/**
|
||||
* The available paths and operations for the API.
|
||||
*
|
||||
* @example { "/pets": { "get": { "summary": "List all pets", "responses": { "200": { "description": "A list of pets" } } } } }
|
||||
*/
|
||||
paths?: Paths;
|
||||
|
||||
/**
|
||||
* The incoming webhooks that MAY be received as part of this API and that the
|
||||
* API consumer MAY choose to implement. Closely related to the `callbacks` feature,
|
||||
* this section describes requests initiated other than by an API call, for example
|
||||
* by an out of band registration.
|
||||
*
|
||||
* @example { "newPet": { "post": { "requestBody": { "description": "Information about a new pet" } } } }
|
||||
*/
|
||||
webhooks?: Webhooks;
|
||||
/**
|
||||
* The incoming webhooks that MAY be received as part of this API and that the
|
||||
* API consumer MAY choose to implement. Closely related to the `callbacks` feature,
|
||||
* this section describes requests initiated other than by an API call, for example
|
||||
* by an out of band registration.
|
||||
*
|
||||
* @example { "newPet": { "post": { "requestBody": { "description": "Information about a new pet" } } } }
|
||||
*/
|
||||
webhooks?: Webhooks;
|
||||
|
||||
/**
|
||||
* An element to hold various schemas for the document.
|
||||
*
|
||||
* @example { schemas: { Pet: { type: "object", properties: { id: { type: "integer" } } } } }
|
||||
*/
|
||||
components?: Components;
|
||||
/**
|
||||
* An element to hold various schemas for the document.
|
||||
*
|
||||
* @example { schemas: { Pet: { type: "object", properties: { id: { type: "integer" } } } } }
|
||||
*/
|
||||
components?: Components;
|
||||
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used across the API. The list
|
||||
* of values includes alternative security requirement objects that can be used.
|
||||
* Only one of the security requirement objects need to be satisfied to authorize
|
||||
* a request. Individual operations can override this definition.
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used across the API. The list
|
||||
* of values includes alternative security requirement objects that can be used.
|
||||
* Only one of the security requirement objects need to be satisfied to authorize
|
||||
* a request. Individual operations can override this definition.
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
|
||||
/**
|
||||
* A list of tags used by the document with additional metadata. The order of the
|
||||
* tags can be used to reflect on their order by the parsing tools. Not all tags
|
||||
* that are used by the Operation Object must be declared. The tags that are not
|
||||
* declared MAY be organized randomly or based on the tools' logic. Each tag name
|
||||
* in the list MUST be unique.
|
||||
*
|
||||
* @example [{ name: "pets", description: "Pet store operations" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
/**
|
||||
* A list of tags used by the document with additional metadata. The order of the
|
||||
* tags can be used to reflect on their order by the parsing tools. Not all tags
|
||||
* that are used by the Operation Object must be declared. The tags that are not
|
||||
* declared MAY be organized randomly or based on the tools' logic. Each tag name
|
||||
* in the list MUST be unique.
|
||||
*
|
||||
* @example [{ name: "pets", description: "Pet store operations" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
}
|
||||
|
||||
1970
3.1/status.ts
1970
3.1/status.ts
File diff suppressed because it is too large
Load Diff
42
3.1/tags.ts
42
3.1/tags.ts
@@ -55,27 +55,27 @@ import type { ExternalDocumentation } from "./externalDocs";
|
||||
* ```
|
||||
*/
|
||||
export interface Tag extends Extension {
|
||||
/**
|
||||
* The name of the tag. This field is required.
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the tag. This field is required.
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A short description for the tag. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for the tag. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
}
|
||||
|
||||
88
3.1/xml.ts
88
3.1/xml.ts
@@ -74,52 +74,52 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface XML extends Extension {
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* When defined within the Items Object (items), it will affect the name of the individual
|
||||
* XML elements within the list. When defined alongside type being array (outside the items),
|
||||
* it will affect the wrapping element and only if wrapped is true. If wrapped is false,
|
||||
* it will be ignored.
|
||||
*
|
||||
* @example "user"
|
||||
* @example "id"
|
||||
* @example "users"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* When defined within the Items Object (items), it will affect the name of the individual
|
||||
* XML elements within the list. When defined alongside type being array (outside the items),
|
||||
* it will affect the wrapping element and only if wrapped is true. If wrapped is false,
|
||||
* it will be ignored.
|
||||
*
|
||||
* @example "user"
|
||||
* @example "id"
|
||||
* @example "users"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URI of the namespace definition. This MUST be in the form of an absolute URI.
|
||||
*
|
||||
* @example "http://example.com/schema/user"
|
||||
* @example "http://www.w3.org/XML/1998/namespace"
|
||||
*/
|
||||
namespace?: string;
|
||||
/**
|
||||
* The URI of the namespace definition. This MUST be in the form of an absolute URI.
|
||||
*
|
||||
* @example "http://example.com/schema/user"
|
||||
* @example "http://www.w3.org/XML/1998/namespace"
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* The prefix to be used for the name.
|
||||
*
|
||||
* @example "user"
|
||||
* @example "xml"
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* The prefix to be used for the name.
|
||||
*
|
||||
* @example "user"
|
||||
* @example "xml"
|
||||
*/
|
||||
prefix?: string;
|
||||
|
||||
/**
|
||||
* Declares whether the property definition translates to an attribute instead of an element.
|
||||
* Default value is false.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
attribute?: boolean;
|
||||
/**
|
||||
* Declares whether the property definition translates to an attribute instead of an element.
|
||||
* Default value is false.
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
attribute?: boolean;
|
||||
|
||||
/**
|
||||
* MAY be used only for an array definition. Signifies whether the array is wrapped
|
||||
* (for example, `<books><book/><book/></books>`) or unwrapped
|
||||
* (for example, `<book/><book/>`). Default value is false. The definition takes effect
|
||||
* only when defined alongside type being array (outside the items).
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
wrapped?: boolean;
|
||||
/**
|
||||
* MAY be used only for an array definition. Signifies whether the array is wrapped
|
||||
* (for example, `<books><book/><book/></books>`) or unwrapped
|
||||
* (for example, `<book/><book/>`). Default value is false. The definition takes effect
|
||||
* only when defined alongside type being array (outside the items).
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
wrapped?: boolean;
|
||||
}
|
||||
|
||||
1424
3.2/3.2.0.md
1424
3.2/3.2.0.md
File diff suppressed because it is too large
Load Diff
1432
3.2/components.ts
1432
3.2/components.ts
File diff suppressed because it is too large
Load Diff
@@ -84,130 +84,130 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ArraySchema extends Extension {
|
||||
/**
|
||||
* The type identifier for array schemas.
|
||||
* Must be "array".
|
||||
*/
|
||||
type: "array";
|
||||
/**
|
||||
* The type identifier for array schemas.
|
||||
* Must be "array".
|
||||
*/
|
||||
type: "array";
|
||||
|
||||
/**
|
||||
* The schema for array items.
|
||||
* All items in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
items?: Schema;
|
||||
/**
|
||||
* The schema for array items.
|
||||
* All items in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
items?: Schema;
|
||||
|
||||
/**
|
||||
* The schema for array items at specific positions.
|
||||
* Items at position i must conform to the schema at index i.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
prefixItems?: Schema[];
|
||||
/**
|
||||
* The schema for array items at specific positions.
|
||||
* Items at position i must conform to the schema at index i.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
prefixItems?: Schema[];
|
||||
|
||||
/**
|
||||
* The schema that the array must contain at least one item matching.
|
||||
* At least one item in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", enum: ["admin"] }`
|
||||
*/
|
||||
contains?: Schema;
|
||||
/**
|
||||
* The schema that the array must contain at least one item matching.
|
||||
* At least one item in the array must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", enum: ["admin"] }`
|
||||
*/
|
||||
contains?: Schema;
|
||||
|
||||
/**
|
||||
* The minimum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minContains?: number;
|
||||
/**
|
||||
* The minimum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minContains?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
maxContains?: number;
|
||||
/**
|
||||
* The maximum number of items that must match the contains schema.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
maxContains?: number;
|
||||
|
||||
/**
|
||||
* The minimum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minItems?: number;
|
||||
/**
|
||||
* The minimum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minItems?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxItems?: number;
|
||||
/**
|
||||
* The maximum number of items in the array.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxItems?: number;
|
||||
|
||||
/**
|
||||
* Whether array items must be unique.
|
||||
* If true, all items in the array must be unique.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
/**
|
||||
* Whether array items must be unique.
|
||||
* If true, all items in the array must be unique.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
uniqueItems?: boolean;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the array.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An array of allowed values for the array.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the array.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `["a", "b"]`
|
||||
*/
|
||||
const?: unknown;
|
||||
/**
|
||||
* A single allowed value for the array.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `["a", "b"]`
|
||||
*/
|
||||
const?: unknown;
|
||||
|
||||
/**
|
||||
* An array of example values for the array.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
examples?: unknown[];
|
||||
/**
|
||||
* An array of example values for the array.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[["a", "b"], ["c", "d"]]`
|
||||
*/
|
||||
examples?: unknown[];
|
||||
|
||||
/**
|
||||
* The default value for the array.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `[]`
|
||||
*/
|
||||
default?: unknown[];
|
||||
/**
|
||||
* The default value for the array.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `[]`
|
||||
*/
|
||||
default?: unknown[];
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Tags"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Tags"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Array of user tags"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Array of user tags"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "users" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "users" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -66,66 +66,66 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface BooleanSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for boolean schemas.
|
||||
* Must be "boolean".
|
||||
*/
|
||||
type: "boolean";
|
||||
/**
|
||||
* The type identifier for boolean schemas.
|
||||
* Must be "boolean".
|
||||
*/
|
||||
type: "boolean";
|
||||
|
||||
/**
|
||||
* An array of allowed values for the boolean.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
enum?: boolean[];
|
||||
/**
|
||||
* An array of allowed values for the boolean.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
enum?: boolean[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the boolean.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
const?: boolean;
|
||||
/**
|
||||
* A single allowed value for the boolean.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `true`
|
||||
*/
|
||||
const?: boolean;
|
||||
|
||||
/**
|
||||
* An array of example values for the boolean.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
examples?: boolean[];
|
||||
/**
|
||||
* An array of example values for the boolean.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[true, false]`
|
||||
*/
|
||||
examples?: boolean[];
|
||||
|
||||
/**
|
||||
* The default value for the boolean.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
/**
|
||||
* The default value for the boolean.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Is Active"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Is Active"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Whether the user is active"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Whether the user is active"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "isActive" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "isActive" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -85,116 +85,116 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface CompositionSchema extends Extension {
|
||||
/**
|
||||
* An array of schemas that must all be satisfied.
|
||||
* The value must conform to all schemas in the array.
|
||||
*
|
||||
* Example: `[{ type: "object" }, { properties: { name: { type: "string" } } }]`
|
||||
*/
|
||||
allOf?: Schema[];
|
||||
/**
|
||||
* An array of schemas that must all be satisfied.
|
||||
* The value must conform to all schemas in the array.
|
||||
*
|
||||
* Example: `[{ type: "object" }, { properties: { name: { type: "string" } } }]`
|
||||
*/
|
||||
allOf?: Schema[];
|
||||
|
||||
/**
|
||||
* An array of schemas where at least one must be satisfied.
|
||||
* The value must conform to at least one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
anyOf?: Schema[];
|
||||
/**
|
||||
* An array of schemas where at least one must be satisfied.
|
||||
* The value must conform to at least one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
anyOf?: Schema[];
|
||||
|
||||
/**
|
||||
* An array of schemas where exactly one must be satisfied.
|
||||
* The value must conform to exactly one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
oneOf?: Schema[];
|
||||
/**
|
||||
* An array of schemas where exactly one must be satisfied.
|
||||
* The value must conform to exactly one schema in the array.
|
||||
*
|
||||
* Example: `[{ type: "string" }, { type: "number" }]`
|
||||
*/
|
||||
oneOf?: Schema[];
|
||||
|
||||
/**
|
||||
* A schema that must not be satisfied.
|
||||
* The value must not conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
not?: Schema;
|
||||
/**
|
||||
* A schema that must not be satisfied.
|
||||
* The value must not conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }`
|
||||
*/
|
||||
not?: Schema;
|
||||
|
||||
/**
|
||||
* A schema for conditional validation.
|
||||
* Used with `then` and `else` for conditional logic.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { type: { const: "user" } } }`
|
||||
*/
|
||||
if?: Schema;
|
||||
/**
|
||||
* A schema for conditional validation.
|
||||
* Used with `then` and `else` for conditional logic.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { type: { const: "user" } } }`
|
||||
*/
|
||||
if?: Schema;
|
||||
|
||||
/**
|
||||
* A schema to apply if the `if` condition is met.
|
||||
* The value must conform to this schema if the `if` schema is satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { name: { type: "string" } } }`
|
||||
*/
|
||||
then?: Schema;
|
||||
/**
|
||||
* A schema to apply if the `if` condition is met.
|
||||
* The value must conform to this schema if the `if` schema is satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { name: { type: "string" } } }`
|
||||
*/
|
||||
then?: Schema;
|
||||
|
||||
/**
|
||||
* A schema to apply if the `if` condition is not met.
|
||||
* The value must conform to this schema if the `if` schema is not satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { id: { type: "string" } } }`
|
||||
*/
|
||||
else?: Schema;
|
||||
/**
|
||||
* A schema to apply if the `if` condition is not met.
|
||||
* The value must conform to this schema if the `if` schema is not satisfied.
|
||||
*
|
||||
* Example: `{ type: "object", properties: { id: { type: "string" } } }`
|
||||
*/
|
||||
else?: Schema;
|
||||
|
||||
/**
|
||||
* An array of allowed values.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive"]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
/**
|
||||
* An array of allowed values.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive"]`
|
||||
*/
|
||||
enum?: unknown[];
|
||||
|
||||
/**
|
||||
* A single allowed value.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: unknown;
|
||||
/**
|
||||
* A single allowed value.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: unknown;
|
||||
|
||||
/**
|
||||
* An array of example values.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example1", "example2"]`
|
||||
*/
|
||||
examples?: unknown[];
|
||||
/**
|
||||
* An array of example values.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example1", "example2"]`
|
||||
*/
|
||||
examples?: unknown[];
|
||||
|
||||
/**
|
||||
* The default value.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* The default value.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: unknown;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Composed Schema"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Composed Schema"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A schema composed of multiple schemas"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A schema composed of multiple schemas"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "composedSchema" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "composedSchema" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -75,114 +75,114 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface IntegerSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for integer schemas.
|
||||
* Must be "integer".
|
||||
*/
|
||||
type: "integer";
|
||||
/**
|
||||
* The type identifier for integer schemas.
|
||||
* Must be "integer".
|
||||
*/
|
||||
type: "integer";
|
||||
|
||||
/**
|
||||
* The format of the integer.
|
||||
* See OpenAPI 3.2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"int32"`, `"int64"`
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The format of the integer.
|
||||
* See OpenAPI 3.2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"int32"`, `"int64"`
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* The integer must be a multiple of this value.
|
||||
* Must be a positive integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
/**
|
||||
* The integer must be a multiple of this value.
|
||||
* Must be a positive integer.
|
||||
*
|
||||
* Example: `5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the integer (inclusive).
|
||||
* The integer must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* The maximum value of the integer (inclusive).
|
||||
* The integer must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the integer (inclusive).
|
||||
* The integer must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* The minimum value of the integer (inclusive).
|
||||
* The integer must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the integer (exclusive).
|
||||
* The integer must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
/**
|
||||
* The maximum value of the integer (exclusive).
|
||||
* The integer must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the integer (exclusive).
|
||||
* The integer must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
/**
|
||||
* The minimum value of the integer (exclusive).
|
||||
* The integer must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the integer.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
/**
|
||||
* An array of allowed values for the integer.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the integer.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
/**
|
||||
* A single allowed value for the integer.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
|
||||
/**
|
||||
* An array of example values for the integer.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1, 2, 3]`
|
||||
*/
|
||||
examples?: number[];
|
||||
/**
|
||||
* An array of example values for the integer.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1, 2, 3]`
|
||||
*/
|
||||
examples?: number[];
|
||||
|
||||
/**
|
||||
* The default value for the integer.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
/**
|
||||
* The default value for the integer.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User ID"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User ID"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The unique identifier of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The unique identifier of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "userId" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "userId" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -75,114 +75,114 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface NumberSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for number schemas.
|
||||
* Must be "number".
|
||||
*/
|
||||
type: "number";
|
||||
/**
|
||||
* The type identifier for number schemas.
|
||||
* Must be "number".
|
||||
*/
|
||||
type: "number";
|
||||
|
||||
/**
|
||||
* The format of the number.
|
||||
* See OpenAPI 3.2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"float"`, `"double"`
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The format of the number.
|
||||
* See OpenAPI 3.2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"float"`, `"double"`
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* The number must be a multiple of this value.
|
||||
* Must be a positive number.
|
||||
*
|
||||
* Example: `0.5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
/**
|
||||
* The number must be a multiple of this value.
|
||||
* Must be a positive number.
|
||||
*
|
||||
* Example: `0.5`
|
||||
*/
|
||||
multipleOf?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the number (inclusive).
|
||||
* The number must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
/**
|
||||
* The maximum value of the number (inclusive).
|
||||
* The number must be less than or equal to this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
maximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the number (inclusive).
|
||||
* The number must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
/**
|
||||
* The minimum value of the number (inclusive).
|
||||
* The number must be greater than or equal to this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
minimum?: number;
|
||||
|
||||
/**
|
||||
* The maximum value of the number (exclusive).
|
||||
* The number must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
/**
|
||||
* The maximum value of the number (exclusive).
|
||||
* The number must be less than this value.
|
||||
*
|
||||
* Example: `100`
|
||||
*/
|
||||
exclusiveMaximum?: number;
|
||||
|
||||
/**
|
||||
* The minimum value of the number (exclusive).
|
||||
* The number must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
/**
|
||||
* The minimum value of the number (exclusive).
|
||||
* The number must be greater than this value.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
exclusiveMinimum?: number;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the number.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
/**
|
||||
* An array of allowed values for the number.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[1, 2, 3, 4, 5]`
|
||||
*/
|
||||
enum?: number[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the number.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
/**
|
||||
* A single allowed value for the number.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `42`
|
||||
*/
|
||||
const?: number;
|
||||
|
||||
/**
|
||||
* An array of example values for the number.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1.5, 2.7, 3.14]`
|
||||
*/
|
||||
examples?: number[];
|
||||
/**
|
||||
* An array of example values for the number.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[1.5, 2.7, 3.14]`
|
||||
*/
|
||||
examples?: number[];
|
||||
|
||||
/**
|
||||
* The default value for the number.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
/**
|
||||
* The default value for the number.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `0`
|
||||
*/
|
||||
default?: number;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Price"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"Price"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The price of the item"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The price of the item"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "price" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "price" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -89,140 +89,140 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface ObjectSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for object schemas.
|
||||
* Must be "object".
|
||||
*/
|
||||
type: "object";
|
||||
/**
|
||||
* The type identifier for object schemas.
|
||||
* Must be "object".
|
||||
*/
|
||||
type: "object";
|
||||
|
||||
/**
|
||||
* A map of property names to their schemas.
|
||||
* Each property in the object must conform to its corresponding schema.
|
||||
*
|
||||
* Example: `{ name: { type: "string" }, age: { type: "number" } }`
|
||||
*/
|
||||
properties?: Record<string, Schema>;
|
||||
/**
|
||||
* A map of property names to their schemas.
|
||||
* Each property in the object must conform to its corresponding schema.
|
||||
*
|
||||
* Example: `{ name: { type: "string" }, age: { type: "number" } }`
|
||||
*/
|
||||
properties?: Record<string, Schema>;
|
||||
|
||||
/**
|
||||
* An array of required property names.
|
||||
* These properties must be present in the object.
|
||||
*
|
||||
* Example: `["name", "email"]`
|
||||
*/
|
||||
required?: string[];
|
||||
/**
|
||||
* An array of required property names.
|
||||
* These properties must be present in the object.
|
||||
*
|
||||
* Example: `["name", "email"]`
|
||||
*/
|
||||
required?: string[];
|
||||
|
||||
/**
|
||||
* The schema for additional properties not defined in properties.
|
||||
* If false, no additional properties are allowed.
|
||||
* If true, any additional properties are allowed.
|
||||
* If a schema, additional properties must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }` or `false` or `true`
|
||||
*/
|
||||
additionalProperties?: Schema | boolean;
|
||||
/**
|
||||
* The schema for additional properties not defined in properties.
|
||||
* If false, no additional properties are allowed.
|
||||
* If true, any additional properties are allowed.
|
||||
* If a schema, additional properties must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string" }` or `false` or `true`
|
||||
*/
|
||||
additionalProperties?: Schema | boolean;
|
||||
|
||||
/**
|
||||
* A map of regex patterns to schemas.
|
||||
* Properties whose names match a pattern must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ "^S_": { type: "string" } }`
|
||||
*/
|
||||
patternProperties?: Record<string, Schema>;
|
||||
/**
|
||||
* A map of regex patterns to schemas.
|
||||
* Properties whose names match a pattern must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ "^S_": { type: "string" } }`
|
||||
*/
|
||||
patternProperties?: Record<string, Schema>;
|
||||
|
||||
/**
|
||||
* The schema for property names.
|
||||
* All property names in the object must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", pattern: "^[A-Za-z][A-Za-z0-9]*$" }`
|
||||
*/
|
||||
propertyNames?: Schema;
|
||||
/**
|
||||
* The schema for property names.
|
||||
* All property names in the object must conform to this schema.
|
||||
*
|
||||
* Example: `{ type: "string", pattern: "^[A-Za-z][A-Za-z0-9]*$" }`
|
||||
*/
|
||||
propertyNames?: Schema;
|
||||
|
||||
/**
|
||||
* The minimum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minProperties?: number;
|
||||
/**
|
||||
* The minimum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minProperties?: number;
|
||||
|
||||
/**
|
||||
* The maximum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxProperties?: number;
|
||||
/**
|
||||
* The maximum number of properties in the object.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `10`
|
||||
*/
|
||||
maxProperties?: number;
|
||||
|
||||
/**
|
||||
* A map of property names to arrays of required properties.
|
||||
* If a property is present, the properties in its array must also be present.
|
||||
*
|
||||
* Example: `{ credit_card: ["billing_address"] }`
|
||||
*/
|
||||
dependentRequired?: Record<string, string[]>;
|
||||
/**
|
||||
* A map of property names to arrays of required properties.
|
||||
* If a property is present, the properties in its array must also be present.
|
||||
*
|
||||
* Example: `{ credit_card: ["billing_address"] }`
|
||||
*/
|
||||
dependentRequired?: Record<string, string[]>;
|
||||
|
||||
/**
|
||||
* A map of property names to schemas.
|
||||
* If a property is present, the object must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ credit_card: { type: "object", properties: { number: { type: "string" } } } }`
|
||||
*/
|
||||
dependentSchemas?: Record<string, Schema>;
|
||||
/**
|
||||
* A map of property names to schemas.
|
||||
* If a property is present, the object must conform to the corresponding schema.
|
||||
*
|
||||
* Example: `{ credit_card: { type: "object", properties: { number: { type: "string" } } } }`
|
||||
*/
|
||||
dependentSchemas?: Record<string, Schema>;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the object.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[{ name: "John" }, { name: "Jane" }]`
|
||||
*/
|
||||
enum?: Record<string, unknown>[];
|
||||
/**
|
||||
* An array of allowed values for the object.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `[{ name: "John" }, { name: "Jane" }]`
|
||||
*/
|
||||
enum?: Record<string, unknown>[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the object.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `{ name: "John" }`
|
||||
*/
|
||||
const?: Record<string, unknown>;
|
||||
/**
|
||||
* A single allowed value for the object.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `{ name: "John" }`
|
||||
*/
|
||||
const?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* An array of example values for the object.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[{ name: "John", age: 30 }]`
|
||||
*/
|
||||
examples?: Record<string, unknown>[];
|
||||
/**
|
||||
* An array of example values for the object.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `[{ name: "John", age: 30 }]`
|
||||
*/
|
||||
examples?: Record<string, unknown>[];
|
||||
|
||||
/**
|
||||
* The default value for the object.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `{}`
|
||||
*/
|
||||
default?: Record<string, unknown>;
|
||||
/**
|
||||
* The default value for the object.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `{}`
|
||||
*/
|
||||
default?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A user object"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"A user object"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "user" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "user" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -52,19 +52,19 @@ import type { Extension } from "../extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ReferenceSchema extends Extension {
|
||||
/**
|
||||
* A reference to a schema. This MUST be in the form of a URI.
|
||||
* When present, no other properties except `description` and extensions are allowed.
|
||||
*
|
||||
* Example: `"#/components/schemas/User"`
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* A reference to a schema. This MUST be in the form of a URI.
|
||||
* When present, no other properties except `description` and extensions are allowed.
|
||||
*
|
||||
* Example: `"#/components/schemas/User"`
|
||||
*/
|
||||
$ref: string;
|
||||
|
||||
/**
|
||||
* A description of the referenced schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Reference to a user schema"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the referenced schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"Reference to a user schema"`
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
@@ -72,98 +72,98 @@ import type { XML } from "../xml";
|
||||
* ```
|
||||
*/
|
||||
export interface StringSchema extends Extension {
|
||||
/**
|
||||
* The type identifier for string schemas.
|
||||
* Must be "string".
|
||||
*/
|
||||
type: "string";
|
||||
/**
|
||||
* The type identifier for string schemas.
|
||||
* Must be "string".
|
||||
*/
|
||||
type: "string";
|
||||
|
||||
/**
|
||||
* The format of the string.
|
||||
* See OpenAPI 3.2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"email"`, `"date-time"`, `"uuid"`
|
||||
*/
|
||||
format?: string;
|
||||
/**
|
||||
* The format of the string.
|
||||
* See OpenAPI 3.2.0 Data Type Formats for further details.
|
||||
*
|
||||
* Example: `"email"`, `"date-time"`, `"uuid"`
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* The maximum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `255`
|
||||
*/
|
||||
maxLength?: number;
|
||||
/**
|
||||
* The maximum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `255`
|
||||
*/
|
||||
maxLength?: number;
|
||||
|
||||
/**
|
||||
* The minimum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minLength?: number;
|
||||
/**
|
||||
* The minimum length of the string.
|
||||
* Must be a non-negative integer.
|
||||
*
|
||||
* Example: `1`
|
||||
*/
|
||||
minLength?: number;
|
||||
|
||||
/**
|
||||
* A regular expression pattern that the string must match.
|
||||
* Should be a valid ECMA 262 regular expression.
|
||||
*
|
||||
* Example: `"^[A-Za-z0-9]+$"`
|
||||
*/
|
||||
pattern?: string;
|
||||
/**
|
||||
* A regular expression pattern that the string must match.
|
||||
* Should be a valid ECMA 262 regular expression.
|
||||
*
|
||||
* Example: `"^[A-Za-z0-9]+$"`
|
||||
*/
|
||||
pattern?: string;
|
||||
|
||||
/**
|
||||
* An array of allowed values for the string.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive", "pending"]`
|
||||
*/
|
||||
enum?: string[];
|
||||
/**
|
||||
* An array of allowed values for the string.
|
||||
* The value must be one of the values in this array.
|
||||
*
|
||||
* Example: `["active", "inactive", "pending"]`
|
||||
*/
|
||||
enum?: string[];
|
||||
|
||||
/**
|
||||
* A single allowed value for the string.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: string;
|
||||
/**
|
||||
* A single allowed value for the string.
|
||||
* The value must be exactly this value.
|
||||
*
|
||||
* Example: `"active"`
|
||||
*/
|
||||
const?: string;
|
||||
|
||||
/**
|
||||
* An array of example values for the string.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example@email.com", "test@domain.com"]`
|
||||
*/
|
||||
examples?: string[];
|
||||
/**
|
||||
* An array of example values for the string.
|
||||
* These are for documentation purposes only.
|
||||
*
|
||||
* Example: `["example@email.com", "test@domain.com"]`
|
||||
*/
|
||||
examples?: string[];
|
||||
|
||||
/**
|
||||
* The default value for the string.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: string;
|
||||
/**
|
||||
* The default value for the string.
|
||||
* This value will be used if no value is provided.
|
||||
*
|
||||
* Example: `"default"`
|
||||
*/
|
||||
default?: string;
|
||||
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Email"`
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* A short title for the schema.
|
||||
* This is for documentation purposes only.
|
||||
*
|
||||
* Example: `"User Email"`
|
||||
*/
|
||||
title?: string;
|
||||
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The email address of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the schema.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* Example: `"The email address of the user"`
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "userName" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
/**
|
||||
* XML representation metadata for the schema.
|
||||
* Allows for fine-tuned XML model definitions using the modernized
|
||||
* nodeType approach in OpenAPI 3.2.0.
|
||||
*
|
||||
* Example: `{ nodeType: "element", name: "userName" }`
|
||||
*/
|
||||
xml?: XML;
|
||||
}
|
||||
|
||||
@@ -50,13 +50,13 @@
|
||||
* ```
|
||||
*/
|
||||
export interface Extension {
|
||||
/**
|
||||
* Specification Extensions allow adding custom properties to OpenAPI objects.
|
||||
* All extension properties must start with `x-` and can contain any valid JSON value.
|
||||
*
|
||||
* @example "x-custom-property"
|
||||
* @example "x-internal-id"
|
||||
* @example "x-codegen-settings"
|
||||
*/
|
||||
[key: `x-${string}`]: unknown;
|
||||
/**
|
||||
* Specification Extensions allow adding custom properties to OpenAPI objects.
|
||||
* All extension properties must start with `x-` and can contain any valid JSON value.
|
||||
*
|
||||
* @example "x-custom-property"
|
||||
* @example "x-internal-id"
|
||||
* @example "x-codegen-settings"
|
||||
*/
|
||||
[key: `x-${string}`]: unknown;
|
||||
}
|
||||
|
||||
@@ -42,21 +42,21 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface ExternalDocumentation extends Extension {
|
||||
/**
|
||||
* A short description of the target documentation. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "Find out more about our API"
|
||||
* @example "Additional documentation for this endpoint"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description of the target documentation. CommonMark syntax MAY be used
|
||||
* for rich text representation.
|
||||
*
|
||||
* @example "Find out more about our API"
|
||||
* @example "Additional documentation for this endpoint"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* The URL for the target documentation. This field is required and MUST be in the
|
||||
* format of a URL.
|
||||
*
|
||||
* @example "https://example.com/docs"
|
||||
* @example "https://docs.example.com/api"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The URL for the target documentation. This field is required and MUST be in the
|
||||
* format of a URL.
|
||||
*
|
||||
* @example "https://example.com/docs"
|
||||
* @example "https://docs.example.com/api"
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
16
3.2/index.ts
16
3.2/index.ts
@@ -15,14 +15,14 @@
|
||||
export type { Components } from "./components";
|
||||
// Re-export data-types for convenience
|
||||
export type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
// Core OpenAPI types
|
||||
export type { Extension } from "./extensions";
|
||||
|
||||
324
3.2/info.ts
324
3.2/info.ts
@@ -61,103 +61,103 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Info extends Extension {
|
||||
/**
|
||||
* The title of the API.
|
||||
* This field is required and should be descriptive of the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - title} |
|
||||
*
|
||||
* @property `title` - Required The title of the API
|
||||
*
|
||||
* @example "Pet Store API"
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* The title of the API.
|
||||
* This field is required and should be descriptive of the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - title} |
|
||||
*
|
||||
* @property `title` - Required The title of the API
|
||||
*
|
||||
* @example "Pet Store API"
|
||||
*/
|
||||
title: string;
|
||||
|
||||
/**
|
||||
* A short summary of the API.
|
||||
* This should be a brief description of what the API does.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - summary} |
|
||||
*
|
||||
* @property `summary` - Optional A short summary of the API
|
||||
*
|
||||
* @example "A sample API that uses a petstore as an example"
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* A short summary of the API.
|
||||
* This should be a brief description of what the API does.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - summary} |
|
||||
*
|
||||
* @property `summary` - Optional A short summary of the API
|
||||
*
|
||||
* @example "A sample API that uses a petstore as an example"
|
||||
*/
|
||||
summary?: string;
|
||||
|
||||
/**
|
||||
* A description of the API.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A description of the API
|
||||
*
|
||||
* @example "This is a sample server Petstore server."
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the API.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A description of the API
|
||||
*
|
||||
* @example "This is a sample server Petstore server."
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A URL to the Terms of Service for the API.
|
||||
* This MUST be in the format of a URL.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - termsOfService} |
|
||||
*
|
||||
* @property `termsOfService` - Optional A URL to the Terms of Service for the API
|
||||
*
|
||||
* @example "http://example.com/terms/"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
/**
|
||||
* A URL to the Terms of Service for the API.
|
||||
* This MUST be in the format of a URL.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - termsOfService} |
|
||||
*
|
||||
* @property `termsOfService` - Optional A URL to the Terms of Service for the API
|
||||
*
|
||||
* @example "http://example.com/terms/"
|
||||
*/
|
||||
termsOfService?: string;
|
||||
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
* This object contains contact details for the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - contact} |
|
||||
*
|
||||
* @property `contact` - Optional The contact information for the exposed API
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
/**
|
||||
* The contact information for the exposed API.
|
||||
* This object contains contact details for the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - contact} |
|
||||
*
|
||||
* @property `contact` - Optional The contact information for the exposed API
|
||||
*
|
||||
* @example { name: "API Support", email: "support@example.com" }
|
||||
*/
|
||||
contact?: Contact;
|
||||
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
* This object contains license details for the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - license} |
|
||||
*
|
||||
* @property `license` - Optional The license information for the exposed API
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "https://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
/**
|
||||
* The license information for the exposed API.
|
||||
* This object contains license details for the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - license} |
|
||||
*
|
||||
* @property `license` - Optional The license information for the exposed API
|
||||
*
|
||||
* @example { name: "Apache 2.0", url: "https://www.apache.org/licenses/LICENSE-2.0.html" }
|
||||
*/
|
||||
license?: License;
|
||||
|
||||
/**
|
||||
* The version of the OpenAPI document.
|
||||
* This field is required and should follow semantic versioning.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - version} |
|
||||
*
|
||||
* @property `version` - Required The version of the OpenAPI document
|
||||
*
|
||||
* @example "1.0.0"
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* The version of the OpenAPI document.
|
||||
* This field is required and should follow semantic versioning.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#info-object | OpenAPI 3.2.0 Info Object - version} |
|
||||
*
|
||||
* @property `version` - Required The version of the OpenAPI document
|
||||
*
|
||||
* @example "1.0.0"
|
||||
*/
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,49 +217,49 @@ export interface Info extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Contact extends Extension {
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#contact-object | OpenAPI 3.2.0 Contact Object - name} |
|
||||
*
|
||||
* @property `name` - Optional The identifying name of the contact person/organization
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "John Doe"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The identifying name of the contact person/organization.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#contact-object | OpenAPI 3.2.0 Contact Object - name} |
|
||||
*
|
||||
* @property `name` - Optional The identifying name of the contact person/organization
|
||||
*
|
||||
* @example "API Support"
|
||||
* @example "John Doe"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URL pointing to the contact information.
|
||||
* MUST be in the format of a URL.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#contact-object | OpenAPI 3.2.0 Contact Object - url} |
|
||||
*
|
||||
* @property `url` - Optional A URL pointing to the contact information
|
||||
*
|
||||
* @example "http://www.acme.com/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* The URL pointing to the contact information.
|
||||
* MUST be in the format of a URL.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#contact-object | OpenAPI 3.2.0 Contact Object - url} |
|
||||
*
|
||||
* @property `url` - Optional A URL pointing to the contact information
|
||||
*
|
||||
* @example "http://www.acme.com/support"
|
||||
* @example "https://example.com/contact"
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* The email address of the contact person/organization.
|
||||
* MUST be in the format of an email address.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#contact-object | OpenAPI 3.2.0 Contact Object - email} |
|
||||
*
|
||||
* @property `email` - Optional The email address of the contact person/organization
|
||||
*
|
||||
* @example "support@acme.com"
|
||||
* @example "contact@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* The email address of the contact person/organization.
|
||||
* MUST be in the format of an email address.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#contact-object | OpenAPI 3.2.0 Contact Object - email} |
|
||||
*
|
||||
* @property `email` - Optional The email address of the contact person/organization
|
||||
*
|
||||
* @example "support@acme.com"
|
||||
* @example "contact@example.com"
|
||||
*/
|
||||
email?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,35 +316,35 @@ export interface Contact extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface License extends Extension {
|
||||
/**
|
||||
* The license name used for the API.
|
||||
* This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#license-object | OpenAPI 3.2.0 License Object - name} |
|
||||
*
|
||||
* @property `name` - Required The license name used for the API
|
||||
*
|
||||
* @example "Apache 2.0"
|
||||
* @example "MIT"
|
||||
* @example "Proprietary License"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The license name used for the API.
|
||||
* This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#license-object | OpenAPI 3.2.0 License Object - name} |
|
||||
*
|
||||
* @property `name` - Required The license name used for the API
|
||||
*
|
||||
* @example "Apache 2.0"
|
||||
* @example "MIT"
|
||||
* @example "Proprietary License"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A URL to the license used for the API.
|
||||
* MUST be in the format of a URL.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#license-object | OpenAPI 3.2.0 License Object - url} |
|
||||
*
|
||||
* @property `url` - Optional A URL to the license used for the API
|
||||
*
|
||||
* @example "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
* @example "https://opensource.org/licenses/MIT"
|
||||
* @example "https://example.com/licenses/proprietary-1.0"
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* A URL to the license used for the API.
|
||||
* MUST be in the format of a URL.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#license-object | OpenAPI 3.2.0 License Object - url} |
|
||||
*
|
||||
* @property `url` - Optional A URL to the license used for the API
|
||||
*
|
||||
* @example "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
* @example "https://opensource.org/licenses/MIT"
|
||||
* @example "https://example.com/licenses/proprietary-1.0"
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
140
3.2/oauth.ts
140
3.2/oauth.ts
@@ -64,45 +64,45 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlow extends Extension {
|
||||
/**
|
||||
* The authorization URL to be used for this flow.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/oauth/authorize"`
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
/**
|
||||
* The authorization URL to be used for this flow.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/oauth/authorize"`
|
||||
*/
|
||||
authorizationUrl?: string;
|
||||
|
||||
/**
|
||||
* The token URL to be used for this flow.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/oauth/token"`
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
/**
|
||||
* The token URL to be used for this flow.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/oauth/token"`
|
||||
*/
|
||||
tokenUrl?: string;
|
||||
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/oauth/refresh"`
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
/**
|
||||
* The URL to be used for obtaining refresh tokens.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/oauth/refresh"`
|
||||
*/
|
||||
refreshUrl?: string;
|
||||
|
||||
/**
|
||||
* A map between the scope name and a short description for it.
|
||||
* The map MAY be empty.
|
||||
*
|
||||
* Example: `{ "read": "Read access to user data", "write": "Write access to user data" }`
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
/**
|
||||
* A map between the scope name and a short description for it.
|
||||
* The map MAY be empty.
|
||||
*
|
||||
* Example: `{ "read": "Read access to user data", "write": "Write access to user data" }`
|
||||
*/
|
||||
scopes: Record<string, string>;
|
||||
|
||||
/**
|
||||
* The URL to be used for OAuth 2.0 metadata.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/.well-known/oauth-authorization-server"`
|
||||
*/
|
||||
oauth2MetadataUrl?: string;
|
||||
/**
|
||||
* The URL to be used for OAuth 2.0 metadata.
|
||||
* This MUST be in the form of a URL.
|
||||
*
|
||||
* Example: `"https://example.com/.well-known/oauth-authorization-server"`
|
||||
*/
|
||||
oauth2MetadataUrl?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,43 +181,43 @@ export interface OAuthFlow extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface OAuthFlows extends Extension {
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
* This flow is deprecated in OAuth 2.1.
|
||||
*
|
||||
* Example: `{ authorizationUrl: "https://example.com/oauth/authorize", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Implicit flow.
|
||||
* This flow is deprecated in OAuth 2.1.
|
||||
*
|
||||
* Example: `{ authorizationUrl: "https://example.com/oauth/authorize", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
implicit?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
* This flow is deprecated in OAuth 2.1.
|
||||
*
|
||||
* Example: `{ tokenUrl: "https://example.com/oauth/token", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Resource Owner Password flow.
|
||||
* This flow is deprecated in OAuth 2.1.
|
||||
*
|
||||
* Example: `{ tokenUrl: "https://example.com/oauth/token", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
password?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
* This flow is suitable for machine-to-machine authentication.
|
||||
*
|
||||
* Example: `{ tokenUrl: "https://example.com/oauth/token", scopes: { "api": "Full API access" } }`
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Client Credentials flow.
|
||||
* This flow is suitable for machine-to-machine authentication.
|
||||
*
|
||||
* Example: `{ tokenUrl: "https://example.com/oauth/token", scopes: { "api": "Full API access" } }`
|
||||
*/
|
||||
clientCredentials?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
* This is the recommended flow for web applications.
|
||||
*
|
||||
* Example: `{ authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Authorization Code flow.
|
||||
* This is the recommended flow for web applications.
|
||||
*
|
||||
* Example: `{ authorizationUrl: "https://example.com/oauth/authorize", tokenUrl: "https://example.com/oauth/token", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
authorizationCode?: OAuthFlow;
|
||||
|
||||
/**
|
||||
* Configuration for the OAuth Device Authorization flow.
|
||||
* This flow is suitable for devices with limited input capabilities.
|
||||
*
|
||||
* Example: `{ deviceCodeUrl: "https://example.com/oauth/device", tokenUrl: "https://example.com/oauth/token", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
deviceAuthorization?: OAuthFlow;
|
||||
/**
|
||||
* Configuration for the OAuth Device Authorization flow.
|
||||
* This flow is suitable for devices with limited input capabilities.
|
||||
*
|
||||
* Example: `{ deviceCodeUrl: "https://example.com/oauth/device", tokenUrl: "https://example.com/oauth/token", scopes: { "read": "Read access" } }`
|
||||
*/
|
||||
deviceAuthorization?: OAuthFlow;
|
||||
}
|
||||
|
||||
942
3.2/paths.ts
942
3.2/paths.ts
@@ -60,149 +60,149 @@ import type { ResponsesMap } from "./status";
|
||||
* ```
|
||||
*/
|
||||
export interface PathItem extends Extension {
|
||||
/**
|
||||
* An optional, string summary, intended to apply to all operations in this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - summary} |
|
||||
*
|
||||
* @property `summary` - Optional An optional, string summary, intended to apply to all operations in this path
|
||||
*
|
||||
* @example "Pet operations"
|
||||
* @example "User management"
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* An optional, string summary, intended to apply to all operations in this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - summary} |
|
||||
*
|
||||
* @property `summary` - Optional An optional, string summary, intended to apply to all operations in this path
|
||||
*
|
||||
* @example "Pet operations"
|
||||
* @example "User management"
|
||||
*/
|
||||
summary?: string;
|
||||
|
||||
/**
|
||||
* An optional, string description, intended to apply to all operations in this path.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - description} |
|
||||
*
|
||||
* @property `description` - Optional An optional, string description, intended to apply to all operations in this path
|
||||
*
|
||||
* @example "Operations related to pet management"
|
||||
* @example "All user-related operations"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional, string description, intended to apply to all operations in this path.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - description} |
|
||||
*
|
||||
* @property `description` - Optional An optional, string description, intended to apply to all operations in this path
|
||||
*
|
||||
* @example "Operations related to pet management"
|
||||
* @example "All user-related operations"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A definition of a GET operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - get} |
|
||||
*
|
||||
* @property `get` - Optional A definition of a GET operation on this path
|
||||
*/
|
||||
get?: Operation;
|
||||
/**
|
||||
* A definition of a GET operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - get} |
|
||||
*
|
||||
* @property `get` - Optional A definition of a GET operation on this path
|
||||
*/
|
||||
get?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of a PUT operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - put} |
|
||||
*
|
||||
* @property `put` - Optional A definition of a PUT operation on this path
|
||||
*/
|
||||
put?: Operation;
|
||||
/**
|
||||
* A definition of a PUT operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - put} |
|
||||
*
|
||||
* @property `put` - Optional A definition of a PUT operation on this path
|
||||
*/
|
||||
put?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of a POST operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - post} |
|
||||
*
|
||||
* @property `post` - Optional A definition of a POST operation on this path
|
||||
*/
|
||||
post?: Operation;
|
||||
/**
|
||||
* A definition of a POST operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - post} |
|
||||
*
|
||||
* @property `post` - Optional A definition of a POST operation on this path
|
||||
*/
|
||||
post?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of a DELETE operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - delete} |
|
||||
*
|
||||
* @property `delete` - Optional A definition of a DELETE operation on this path
|
||||
*/
|
||||
delete?: Operation;
|
||||
/**
|
||||
* A definition of a DELETE operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - delete} |
|
||||
*
|
||||
* @property `delete` - Optional A definition of a DELETE operation on this path
|
||||
*/
|
||||
delete?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of an OPTIONS operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - options} |
|
||||
*
|
||||
* @property `options` - Optional A definition of an OPTIONS operation on this path
|
||||
*/
|
||||
options?: Operation;
|
||||
/**
|
||||
* A definition of an OPTIONS operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - options} |
|
||||
*
|
||||
* @property `options` - Optional A definition of an OPTIONS operation on this path
|
||||
*/
|
||||
options?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of a HEAD operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - head} |
|
||||
*
|
||||
* @property `head` - Optional A definition of a HEAD operation on this path
|
||||
*/
|
||||
head?: Operation;
|
||||
/**
|
||||
* A definition of a HEAD operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - head} |
|
||||
*
|
||||
* @property `head` - Optional A definition of a HEAD operation on this path
|
||||
*/
|
||||
head?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of a PATCH operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - patch} |
|
||||
*
|
||||
* @property `patch` - Optional A definition of a PATCH operation on this path
|
||||
*/
|
||||
patch?: Operation;
|
||||
/**
|
||||
* A definition of a PATCH operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - patch} |
|
||||
*
|
||||
* @property `patch` - Optional A definition of a PATCH operation on this path
|
||||
*/
|
||||
patch?: Operation;
|
||||
|
||||
/**
|
||||
* A definition of a TRACE operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - trace} |
|
||||
*
|
||||
* @property `trace` - Optional A definition of a TRACE operation on this path
|
||||
*/
|
||||
trace?: Operation;
|
||||
/**
|
||||
* A definition of a TRACE operation on this path.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - trace} |
|
||||
*
|
||||
* @property `trace` - Optional A definition of a TRACE operation on this path
|
||||
*/
|
||||
trace?: Operation;
|
||||
|
||||
/**
|
||||
* An alternative server array to service all operations in this path.
|
||||
* If an alternative server object is specified at the Path Item Object level,
|
||||
* it will override the server object defined at the root level.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - servers} |
|
||||
*
|
||||
* @property `servers` - Optional An alternative server array to service all operations in this path
|
||||
*/
|
||||
servers?: Server[];
|
||||
/**
|
||||
* An alternative server array to service all operations in this path.
|
||||
* If an alternative server object is specified at the Path Item Object level,
|
||||
* it will override the server object defined at the root level.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - servers} |
|
||||
*
|
||||
* @property `servers` - Optional An alternative server array to service all operations in this path
|
||||
*/
|
||||
servers?: Server[];
|
||||
|
||||
/**
|
||||
* A list of parameters that are applicable for all the operations described under this path.
|
||||
* These parameters can be overridden at the operation level, but cannot be removed there.
|
||||
* The list MUST NOT include duplicated parameters. A unique parameter is defined by a
|
||||
* combination of a name and location.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - parameters} |
|
||||
*
|
||||
* @property `parameters` - Optional A list of parameters that are applicable for all the operations described under this path
|
||||
*/
|
||||
parameters?: Parameter[];
|
||||
/**
|
||||
* A list of parameters that are applicable for all the operations described under this path.
|
||||
* These parameters can be overridden at the operation level, but cannot be removed there.
|
||||
* The list MUST NOT include duplicated parameters. A unique parameter is defined by a
|
||||
* combination of a name and location.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#path-item-object | OpenAPI 3.2.0 Path Item Object - parameters} |
|
||||
*
|
||||
* @property `parameters` - Optional A list of parameters that are applicable for all the operations described under this path
|
||||
*/
|
||||
parameters?: Parameter[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -254,152 +254,152 @@ export interface PathItem extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Operation extends Extension {
|
||||
/**
|
||||
* A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - tags} |
|
||||
*
|
||||
* @property `tags` - Optional A list of tags for API documentation control
|
||||
*
|
||||
* @example ["pets", "list"]
|
||||
* @example ["users", "authentication"]
|
||||
*/
|
||||
tags?: string[];
|
||||
/**
|
||||
* A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - tags} |
|
||||
*
|
||||
* @property `tags` - Optional A list of tags for API documentation control
|
||||
*
|
||||
* @example ["pets", "list"]
|
||||
* @example ["users", "authentication"]
|
||||
*/
|
||||
tags?: string[];
|
||||
|
||||
/**
|
||||
* A short summary of what the operation does.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - summary} |
|
||||
*
|
||||
* @property `summary` - Optional A short summary of what the operation does
|
||||
*
|
||||
* @example "List all pets"
|
||||
* @example "Create a new user"
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* A short summary of what the operation does.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - summary} |
|
||||
*
|
||||
* @property `summary` - Optional A short summary of what the operation does
|
||||
*
|
||||
* @example "List all pets"
|
||||
* @example "Create a new user"
|
||||
*/
|
||||
summary?: string;
|
||||
|
||||
/**
|
||||
* A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A verbose explanation of the operation behavior
|
||||
*
|
||||
* @example "Returns a list of all pets in the system"
|
||||
* @example "Creates a new user account with the provided information"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A verbose explanation of the operation behavior
|
||||
*
|
||||
* @example "Returns a list of all pets in the system"
|
||||
* @example "Creates a new user account with the provided information"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Additional external documentation for this operation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - externalDocs} |
|
||||
*
|
||||
* @property `externalDocs` - Optional Additional external documentation for this operation
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for this operation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - externalDocs} |
|
||||
*
|
||||
* @property `externalDocs` - Optional Additional external documentation for this operation
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
|
||||
/**
|
||||
* Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - operationId} |
|
||||
*
|
||||
* @property `operationId` - Optional Unique string used to identify the operation
|
||||
*
|
||||
* @example "listPets"
|
||||
* @example "createUser"
|
||||
*/
|
||||
operationId?: string;
|
||||
/**
|
||||
* Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - operationId} |
|
||||
*
|
||||
* @property `operationId` - Optional Unique string used to identify the operation
|
||||
*
|
||||
* @example "listPets"
|
||||
* @example "createUser"
|
||||
*/
|
||||
operationId?: string;
|
||||
|
||||
/**
|
||||
* A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item level, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - parameters} |
|
||||
*
|
||||
* @property `parameters` - Optional A list of parameters that are applicable for this operation
|
||||
*/
|
||||
parameters?: Parameter[];
|
||||
/**
|
||||
* A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item level, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - parameters} |
|
||||
*
|
||||
* @property `parameters` - Optional A list of parameters that are applicable for this operation
|
||||
*/
|
||||
parameters?: Parameter[];
|
||||
|
||||
/**
|
||||
* The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - requestBody} |
|
||||
*
|
||||
* @property `requestBody` - Optional The request body applicable for this operation
|
||||
*/
|
||||
requestBody?: RequestBody;
|
||||
/**
|
||||
* The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - requestBody} |
|
||||
*
|
||||
* @property `requestBody` - Optional The request body applicable for this operation
|
||||
*/
|
||||
requestBody?: RequestBody;
|
||||
|
||||
/**
|
||||
* The list of possible responses as they are returned from executing this operation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - responses} |
|
||||
*
|
||||
* @property `responses` - Optional The list of possible responses as they are returned from executing this operation
|
||||
*/
|
||||
responses?: ResponsesMap;
|
||||
/**
|
||||
* The list of possible responses as they are returned from executing this operation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - responses} |
|
||||
*
|
||||
* @property `responses` - Optional The list of possible responses as they are returned from executing this operation
|
||||
*/
|
||||
responses?: ResponsesMap;
|
||||
|
||||
/**
|
||||
* A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - callbacks} |
|
||||
*
|
||||
* @property `callbacks` - Optional A map of possible out-of band callbacks related to the parent operation
|
||||
*/
|
||||
callbacks?: Record<string, Callback | Reference>;
|
||||
/**
|
||||
* A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - callbacks} |
|
||||
*
|
||||
* @property `callbacks` - Optional A map of possible out-of band callbacks related to the parent operation
|
||||
*/
|
||||
callbacks?: Record<string, Callback | Reference>;
|
||||
|
||||
/**
|
||||
* Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - deprecated} |
|
||||
*
|
||||
* @property `deprecated` - Optional Declares this operation to be deprecated
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - deprecated} |
|
||||
*
|
||||
* @property `deprecated` - Optional Declares this operation to be deprecated
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level security.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - security} |
|
||||
*
|
||||
* @property `security` - Optional A declaration of which security mechanisms can be used for this operation
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level security.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - security} |
|
||||
*
|
||||
* @property `security` - Optional A declaration of which security mechanisms can be used for this operation
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
|
||||
/**
|
||||
* An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - servers} |
|
||||
*
|
||||
* @property `servers` - Optional An alternative server array to service this operation
|
||||
*/
|
||||
servers?: Server[];
|
||||
/**
|
||||
* An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#operation-object | OpenAPI 3.2.0 Operation Object - servers} |
|
||||
*
|
||||
* @property `servers` - Optional An alternative server array to service this operation
|
||||
*/
|
||||
servers?: Server[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -462,222 +462,222 @@ export interface Operation extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface Parameter extends Extension {
|
||||
/**
|
||||
* The name of the parameter. Parameter names are case sensitive.
|
||||
* - If in is "path", the name field MUST correspond to the associated path segment
|
||||
* - If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored
|
||||
* - For all other cases, the name corresponds to the parameter name used by the in property
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - name} |
|
||||
*
|
||||
* @property `name` - Required The name of the parameter
|
||||
*
|
||||
* @example "id"
|
||||
* @example "limit"
|
||||
* @example "user"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the parameter. Parameter names are case sensitive.
|
||||
* - If in is "path", the name field MUST correspond to the associated path segment
|
||||
* - If in is "header" and the name field is "Accept", "Content-Type" or "Authorization", the parameter definition SHALL be ignored
|
||||
* - For all other cases, the name corresponds to the parameter name used by the in property
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - name} |
|
||||
*
|
||||
* @property `name` - Required The name of the parameter
|
||||
*
|
||||
* @example "id"
|
||||
* @example "limit"
|
||||
* @example "user"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The location of the parameter. Possible values are "query", "header", "path" or "cookie".
|
||||
*
|
||||
* - **query**: Parameters that are appended to the URL
|
||||
* - **header**: Custom headers that are expected as part of the request
|
||||
* - **path**: Used together with Path Templating, where the parameter value is actually part of the operation's URL
|
||||
* - **cookie**: Used to pass a specific cookie value to the API
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - in} |
|
||||
*
|
||||
* @property `in` - Required The location of the parameter
|
||||
*
|
||||
* @example "query"
|
||||
* @example "path"
|
||||
* @example "header"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in: "query" | "header" | "path" | "cookie";
|
||||
/**
|
||||
* The location of the parameter. Possible values are "query", "header", "path" or "cookie".
|
||||
*
|
||||
* - **query**: Parameters that are appended to the URL
|
||||
* - **header**: Custom headers that are expected as part of the request
|
||||
* - **path**: Used together with Path Templating, where the parameter value is actually part of the operation's URL
|
||||
* - **cookie**: Used to pass a specific cookie value to the API
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - in} |
|
||||
*
|
||||
* @property `in` - Required The location of the parameter
|
||||
*
|
||||
* @example "query"
|
||||
* @example "path"
|
||||
* @example "header"
|
||||
* @example "cookie"
|
||||
*/
|
||||
in: "query" | "header" | "path" | "cookie";
|
||||
|
||||
/**
|
||||
* A brief description of the parameter. This could contain examples of use.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A brief description of the parameter
|
||||
*
|
||||
* @example "User ID to retrieve"
|
||||
* @example "Number of items to return"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A brief description of the parameter. This could contain examples of use.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - description} |
|
||||
*
|
||||
* @property `description` - Optional A brief description of the parameter
|
||||
*
|
||||
* @example "User ID to retrieve"
|
||||
* @example "Number of items to return"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Determines whether this parameter is mandatory. If the parameter location is "path",
|
||||
* this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be
|
||||
* included and its default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - required} |
|
||||
*
|
||||
* @property `required` - Optional Determines whether this parameter is mandatory
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
required?: boolean;
|
||||
/**
|
||||
* Determines whether this parameter is mandatory. If the parameter location is "path",
|
||||
* this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be
|
||||
* included and its default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - required} |
|
||||
*
|
||||
* @property `required` - Optional Determines whether this parameter is mandatory
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
required?: boolean;
|
||||
|
||||
/**
|
||||
* Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - deprecated} |
|
||||
*
|
||||
* @property `deprecated` - Optional Specifies that a parameter is deprecated and SHOULD be transitioned out of usage
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
/**
|
||||
* Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - deprecated} |
|
||||
*
|
||||
* @property `deprecated` - Optional Specifies that a parameter is deprecated and SHOULD be transitioned out of usage
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
deprecated?: boolean;
|
||||
|
||||
/**
|
||||
* Sets the ability to pass empty-valued parameters. This is valid only for query
|
||||
* parameters and allows sending a parameter with an empty value. Default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - allowEmptyValue} |
|
||||
*
|
||||
* @property `allowEmptyValue` - Optional Sets the ability to pass empty-valued parameters
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
allowEmptyValue?: boolean;
|
||||
/**
|
||||
* Sets the ability to pass empty-valued parameters. This is valid only for query
|
||||
* parameters and allows sending a parameter with an empty value. Default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - allowEmptyValue} |
|
||||
*
|
||||
* @property `allowEmptyValue` - Optional Sets the ability to pass empty-valued parameters
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
allowEmptyValue?: boolean;
|
||||
|
||||
/**
|
||||
* Describes how the parameter value will be serialized depending on the type of the parameter value.
|
||||
* Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - style} |
|
||||
*
|
||||
* @property `style` - Optional Describes how the parameter value will be serialized
|
||||
*
|
||||
* @example "form"
|
||||
* @example "simple"
|
||||
* @example "matrix"
|
||||
* @example "label"
|
||||
* @example "spaceDelimited"
|
||||
* @example "pipeDelimited"
|
||||
* @example "deepObject"
|
||||
*/
|
||||
style?:
|
||||
| "matrix"
|
||||
| "label"
|
||||
| "form"
|
||||
| "simple"
|
||||
| "spaceDelimited"
|
||||
| "pipeDelimited"
|
||||
| "deepObject";
|
||||
/**
|
||||
* Describes how the parameter value will be serialized depending on the type of the parameter value.
|
||||
* Default values (based on value of in): for query - form; for path - simple; for header - simple; for cookie - form.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - style} |
|
||||
*
|
||||
* @property `style` - Optional Describes how the parameter value will be serialized
|
||||
*
|
||||
* @example "form"
|
||||
* @example "simple"
|
||||
* @example "matrix"
|
||||
* @example "label"
|
||||
* @example "spaceDelimited"
|
||||
* @example "pipeDelimited"
|
||||
* @example "deepObject"
|
||||
*/
|
||||
style?:
|
||||
| "matrix"
|
||||
| "label"
|
||||
| "form"
|
||||
| "simple"
|
||||
| "spaceDelimited"
|
||||
| "pipeDelimited"
|
||||
| "deepObject";
|
||||
|
||||
/**
|
||||
* When this is true, parameter values of type array or object generate separate parameters
|
||||
* for each value of the array or key-value pair of the map. For other types of parameters
|
||||
* this property has no effect. When style is form, the default value is true.
|
||||
* For all other styles, the default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - explode} |
|
||||
*
|
||||
* @property `explode` - Optional When this is true, parameter values of type array or object generate separate parameters
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
explode?: boolean;
|
||||
/**
|
||||
* When this is true, parameter values of type array or object generate separate parameters
|
||||
* for each value of the array or key-value pair of the map. For other types of parameters
|
||||
* this property has no effect. When style is form, the default value is true.
|
||||
* For all other styles, the default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - explode} |
|
||||
*
|
||||
* @property `explode` - Optional When this is true, parameter values of type array or object generate separate parameters
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
explode?: boolean;
|
||||
|
||||
/**
|
||||
* Determines whether the parameter value SHOULD allow reserved characters, as defined by
|
||||
* RFC3986 :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only
|
||||
* applies to parameters with an in value of query. The default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - allowReserved} |
|
||||
*
|
||||
* @property `allowReserved` - Optional Determines whether the parameter value SHOULD allow reserved characters
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
allowReserved?: boolean;
|
||||
/**
|
||||
* Determines whether the parameter value SHOULD allow reserved characters, as defined by
|
||||
* RFC3986 :/?#[]@!$&'()*+,;= to be included without percent-encoding. This property only
|
||||
* applies to parameters with an in value of query. The default value is false.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - allowReserved} |
|
||||
*
|
||||
* @property `allowReserved` - Optional Determines whether the parameter value SHOULD allow reserved characters
|
||||
*
|
||||
* @example true
|
||||
* @example false
|
||||
*/
|
||||
allowReserved?: boolean;
|
||||
|
||||
/**
|
||||
* The schema defining the type used for the parameter.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - schema} |
|
||||
*
|
||||
* @property `schema` - Optional The schema defining the type used for the parameter
|
||||
*
|
||||
* @example { type: "string" }
|
||||
* @example { type: "integer", minimum: 1, maximum: 100 }
|
||||
*/
|
||||
schema?: Schema;
|
||||
/**
|
||||
* The schema defining the type used for the parameter.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - schema} |
|
||||
*
|
||||
* @property `schema` - Optional The schema defining the type used for the parameter
|
||||
*
|
||||
* @example { type: "string" }
|
||||
* @example { type: "integer", minimum: 1, maximum: 100 }
|
||||
*/
|
||||
schema?: Schema;
|
||||
|
||||
/**
|
||||
* Example of the media type. The example SHOULD match the specified schema and encoding
|
||||
* properties if present. The example object is mutually exclusive of the examples object.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - example} |
|
||||
*
|
||||
* @property `example` - Optional Example of the media type
|
||||
*
|
||||
* @example "example-value"
|
||||
* @example 42
|
||||
*/
|
||||
example?: unknown;
|
||||
/**
|
||||
* Example of the media type. The example SHOULD match the specified schema and encoding
|
||||
* properties if present. The example object is mutually exclusive of the examples object.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - example} |
|
||||
*
|
||||
* @property `example` - Optional Example of the media type
|
||||
*
|
||||
* @example "example-value"
|
||||
* @example 42
|
||||
*/
|
||||
example?: unknown;
|
||||
|
||||
/**
|
||||
* Examples of the media type. Each example SHOULD contain a value in the correct format
|
||||
* as specified in the parameter encoding. The examples object is mutually exclusive of
|
||||
* the example object.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - examples} |
|
||||
*
|
||||
* @property `examples` - Optional Examples of the media type
|
||||
*
|
||||
* @example { "user1": { summary: "A user example", value: "user123" } }
|
||||
*/
|
||||
examples?: Record<string, Example | Reference>;
|
||||
/**
|
||||
* Examples of the media type. Each example SHOULD contain a value in the correct format
|
||||
* as specified in the parameter encoding. The examples object is mutually exclusive of
|
||||
* the example object.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - examples} |
|
||||
*
|
||||
* @property `examples` - Optional Examples of the media type
|
||||
*
|
||||
* @example { "user1": { summary: "A user example", value: "user123" } }
|
||||
*/
|
||||
examples?: Record<string, Example | Reference>;
|
||||
|
||||
/**
|
||||
* A map containing the representations for the parameter. The key is the media type
|
||||
* and the value describes it. The map MUST only contain one entry.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - content} |
|
||||
*
|
||||
* @property `content` - Optional A map containing the representations for the parameter
|
||||
*
|
||||
* @example { "application/json": { schema: { type: "object" } } }
|
||||
*/
|
||||
content?: Record<string, MediaType>;
|
||||
/**
|
||||
* A map containing the representations for the parameter. The key is the media type
|
||||
* and the value describes it. The map MUST only contain one entry.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#parameter-object | OpenAPI 3.2.0 Parameter Object - content} |
|
||||
*
|
||||
* @property `content` - Optional A map containing the representations for the parameter
|
||||
*
|
||||
* @example { "application/json": { schema: { type: "object" } } }
|
||||
*/
|
||||
content?: Record<string, MediaType>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,31 +54,31 @@
|
||||
* ```
|
||||
*/
|
||||
export interface Reference {
|
||||
/**
|
||||
* The reference string. This field is required and must be a valid JSON Reference.
|
||||
* It can reference internal components using `#/` or external resources using URLs.
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "https://example.com/schemas/User.json"
|
||||
*/
|
||||
$ref: string;
|
||||
/**
|
||||
* The reference string. This field is required and must be a valid JSON Reference.
|
||||
* It can reference internal components using `#/` or external resources using URLs.
|
||||
*
|
||||
* @example "#/components/schemas/User"
|
||||
* @example "#/components/responses/NotFound"
|
||||
* @example "https://example.com/schemas/User.json"
|
||||
*/
|
||||
$ref: string;
|
||||
|
||||
/**
|
||||
* A description of the referenced object. This can be used to provide
|
||||
* additional context about what the referenced object represents.
|
||||
*
|
||||
* @example "A user object containing user information"
|
||||
* @example "Standard error response for not found resources"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A description of the referenced object. This can be used to provide
|
||||
* additional context about what the referenced object represents.
|
||||
*
|
||||
* @example "A user object containing user information"
|
||||
* @example "Standard error response for not found resources"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A short summary of the referenced object. This can be used to provide
|
||||
* a brief overview of what the referenced object represents.
|
||||
*
|
||||
* @example "User schema"
|
||||
* @example "Not found response"
|
||||
*/
|
||||
summary?: string;
|
||||
/**
|
||||
* A short summary of the referenced object. This can be used to provide
|
||||
* a brief overview of what the referenced object represents.
|
||||
*
|
||||
* @example "User schema"
|
||||
* @example "Not found response"
|
||||
*/
|
||||
summary?: string;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type {
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
ArraySchema,
|
||||
BooleanSchema,
|
||||
CompositionSchema,
|
||||
IntegerSchema,
|
||||
NumberSchema,
|
||||
ObjectSchema,
|
||||
ReferenceSchema,
|
||||
StringSchema,
|
||||
} from "./data-types";
|
||||
import type { Extension } from "./extensions";
|
||||
|
||||
@@ -56,21 +56,21 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Discriminator extends Extension {
|
||||
/**
|
||||
* The name of the property in the payload that will hold the discriminator value.
|
||||
* This property must be present in the payload.
|
||||
*
|
||||
* Example: `"petType"`
|
||||
*/
|
||||
propertyName: string;
|
||||
/**
|
||||
* The name of the property in the payload that will hold the discriminator value.
|
||||
* This property must be present in the payload.
|
||||
*
|
||||
* Example: `"petType"`
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* An object to hold mappings between payload values and schema names or references.
|
||||
* If not provided, the schema name will be used as the discriminator value.
|
||||
*
|
||||
* Example: `{ dog: "#/components/schemas/Dog", cat: "#/components/schemas/Cat" }`
|
||||
*/
|
||||
mapping?: Record<string, string>;
|
||||
/**
|
||||
* An object to hold mappings between payload values and schema names or references.
|
||||
* If not provided, the schema name will be used as the discriminator value.
|
||||
*
|
||||
* Example: `{ dog: "#/components/schemas/Dog", cat: "#/components/schemas/Cat" }`
|
||||
*/
|
||||
mapping?: Record<string, string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -228,11 +228,11 @@ export interface Discriminator extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export type Schema =
|
||||
| ReferenceSchema
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| CompositionSchema;
|
||||
| ReferenceSchema
|
||||
| StringSchema
|
||||
| NumberSchema
|
||||
| IntegerSchema
|
||||
| BooleanSchema
|
||||
| ArraySchema
|
||||
| ObjectSchema
|
||||
| CompositionSchema;
|
||||
|
||||
164
3.2/servers.ts
164
3.2/servers.ts
@@ -56,49 +56,49 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface Server extends Extension {
|
||||
/**
|
||||
* A URL to the target host.
|
||||
* This URL supports Server Variables and MAY be relative, to indicate that the host
|
||||
* location is relative to the location where the OpenAPI document is being served.
|
||||
* Variable substitutions will be made when a variable is named in {brackets}.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-object | OpenAPI 3.2.0 Server Object - url} |
|
||||
*
|
||||
* @property `url` - Required A URL to the target host
|
||||
*
|
||||
* @example "https://api.example.com/v1"
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* A URL to the target host.
|
||||
* This URL supports Server Variables and MAY be relative, to indicate that the host
|
||||
* location is relative to the location where the OpenAPI document is being served.
|
||||
* Variable substitutions will be made when a variable is named in {brackets}.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-object | OpenAPI 3.2.0 Server Object - url} |
|
||||
*
|
||||
* @property `url` - Required A URL to the target host
|
||||
*
|
||||
* @example "https://api.example.com/v1"
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* An optional string describing the host designated by the URL.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-object | OpenAPI 3.2.0 Server Object - description} |
|
||||
*
|
||||
* @property `description` - Optional An optional string describing the host designated by the URL
|
||||
*
|
||||
* @example "The production API server"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional string describing the host designated by the URL.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-object | OpenAPI 3.2.0 Server Object - description} |
|
||||
*
|
||||
* @property `description` - Optional An optional string describing the host designated by the URL
|
||||
*
|
||||
* @example "The production API server"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* A map between a variable name and its value.
|
||||
* The value is used for substitution in the server's URL template.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-object | OpenAPI 3.2.0 Server Object - variables} |
|
||||
*
|
||||
* @property `variables` - Optional A map between a variable name and its value
|
||||
*
|
||||
* @example { username: { default: "demo" }, port: { default: "8443" } }
|
||||
*/
|
||||
variables?: Record<string, ServerVariable>;
|
||||
/**
|
||||
* A map between a variable name and its value.
|
||||
* The value is used for substitution in the server's URL template.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-object | OpenAPI 3.2.0 Server Object - variables} |
|
||||
*
|
||||
* @property `variables` - Optional A map between a variable name and its value
|
||||
*
|
||||
* @example { username: { default: "demo" }, port: { default: "8443" } }
|
||||
*/
|
||||
variables?: Record<string, ServerVariable>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,47 +145,47 @@ export interface Server extends Extension {
|
||||
* ```
|
||||
*/
|
||||
export interface ServerVariable extends Extension {
|
||||
/**
|
||||
* An enumeration of string values to be used if the substitution options
|
||||
* are from a limited set. The array SHOULD NOT be empty.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-variable-object | OpenAPI 3.2.0 Server Variable Object - enum} |
|
||||
*
|
||||
* @property `enum` - Optional An enumeration of string values to be used if the substitution options are from a limited set
|
||||
*
|
||||
* @example ["8443", "443"]
|
||||
*/
|
||||
enum?: string[];
|
||||
/**
|
||||
* An enumeration of string values to be used if the substitution options
|
||||
* are from a limited set. The array SHOULD NOT be empty.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-variable-object | OpenAPI 3.2.0 Server Variable Object - enum} |
|
||||
*
|
||||
* @property `enum` - Optional An enumeration of string values to be used if the substitution options are from a limited set
|
||||
*
|
||||
* @example ["8443", "443"]
|
||||
*/
|
||||
enum?: string[];
|
||||
|
||||
/**
|
||||
* The default value to use for substitution, which SHALL be sent if an
|
||||
* alternate value is not supplied. Note this behavior is different than
|
||||
* the Schema Object's treatment of default values, because in those cases
|
||||
* parameter values are optional.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-variable-object | OpenAPI 3.2.0 Server Variable Object - default} |
|
||||
*
|
||||
* @property `default` - Required The default value to use for substitution
|
||||
*
|
||||
* @example "demo"
|
||||
*/
|
||||
default: string;
|
||||
/**
|
||||
* The default value to use for substitution, which SHALL be sent if an
|
||||
* alternate value is not supplied. Note this behavior is different than
|
||||
* the Schema Object's treatment of default values, because in those cases
|
||||
* parameter values are optional.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-variable-object | OpenAPI 3.2.0 Server Variable Object - default} |
|
||||
*
|
||||
* @property `default` - Required The default value to use for substitution
|
||||
*
|
||||
* @example "demo"
|
||||
*/
|
||||
default: string;
|
||||
|
||||
/**
|
||||
* An optional description for the server variable.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-variable-object | OpenAPI 3.2.0 Server Variable Object - description} |
|
||||
*
|
||||
* @property `description` - Optional An optional description for the server variable
|
||||
*
|
||||
* @example "this value is assigned by the service provider"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* An optional description for the server variable.
|
||||
* CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#server-variable-object | OpenAPI 3.2.0 Server Variable Object - description} |
|
||||
*
|
||||
* @property `description` - Optional An optional description for the server variable
|
||||
*
|
||||
* @example "this value is assigned by the service provider"
|
||||
*/
|
||||
description?: string;
|
||||
}
|
||||
|
||||
274
3.2/spec.ts
274
3.2/spec.ts
@@ -132,150 +132,150 @@ import type { Webhooks } from "./webhooks";
|
||||
* ```
|
||||
*/
|
||||
export interface Specification extends Extension {
|
||||
/**
|
||||
* This string MUST be the version number of the OpenAPI Specification that the
|
||||
* OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret
|
||||
* the OpenAPI document. This is not related to the API `info.version` string.
|
||||
* This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - openapi} |
|
||||
*
|
||||
* @property `openapi` - Required The version number of the OpenAPI Specification
|
||||
*
|
||||
* @example "3.2.0"
|
||||
*/
|
||||
openapi: string;
|
||||
/**
|
||||
* This string MUST be the version number of the OpenAPI Specification that the
|
||||
* OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret
|
||||
* the OpenAPI document. This is not related to the API `info.version` string.
|
||||
* This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - openapi} |
|
||||
*
|
||||
* @property `openapi` - Required The version number of the OpenAPI Specification
|
||||
*
|
||||
* @example "3.2.0"
|
||||
*/
|
||||
openapi: string;
|
||||
|
||||
/**
|
||||
* Provides metadata about the API. The metadata MAY be used by tooling as required.
|
||||
* This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - info} |
|
||||
*
|
||||
* @property `info` - Required Provides metadata about the API
|
||||
*
|
||||
* @example { title: "Pet Store API", version: "1.0.0" }
|
||||
*/
|
||||
info: Info;
|
||||
/**
|
||||
* Provides metadata about the API. The metadata MAY be used by tooling as required.
|
||||
* This field is required.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - info} |
|
||||
*
|
||||
* @property `info` - Required Provides metadata about the API
|
||||
*
|
||||
* @example { title: "Pet Store API", version: "1.0.0" }
|
||||
*/
|
||||
info: Info;
|
||||
|
||||
/**
|
||||
* The default value for the `$schema` keyword within Schema Objects contained
|
||||
* within this OAS document. This MUST be in the form of a URI.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - jsonSchemaDialect} |
|
||||
*
|
||||
* @property `jsonSchemaDialect` - Optional The default value for the $schema keyword within Schema Objects
|
||||
*
|
||||
* @example "https://json-schema.org/draft/2020-12/schema"
|
||||
*/
|
||||
jsonSchemaDialect?: string;
|
||||
/**
|
||||
* The default value for the `$schema` keyword within Schema Objects contained
|
||||
* within this OAS document. This MUST be in the form of a URI.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - jsonSchemaDialect} |
|
||||
*
|
||||
* @property `jsonSchemaDialect` - Optional The default value for the $schema keyword within Schema Objects
|
||||
*
|
||||
* @example "https://json-schema.org/draft/2020-12/schema"
|
||||
*/
|
||||
jsonSchemaDialect?: string;
|
||||
|
||||
/**
|
||||
* An array of Server Objects, which provide connectivity information to a target
|
||||
* server. If the `servers` property is not provided, or is an empty array, the
|
||||
* default value would be a Server Object with a `url` value of `/`.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - servers} |
|
||||
*
|
||||
* @property `servers` - Optional An array of Server Objects
|
||||
*
|
||||
* @example [{ url: "https://api.example.com/v1", description: "The production API server" }]
|
||||
*/
|
||||
servers?: Server[];
|
||||
/**
|
||||
* An array of Server Objects, which provide connectivity information to a target
|
||||
* server. If the `servers` property is not provided, or is an empty array, the
|
||||
* default value would be a Server Object with a `url` value of `/`.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - servers} |
|
||||
*
|
||||
* @property `servers` - Optional An array of Server Objects
|
||||
*
|
||||
* @example [{ url: "https://api.example.com/v1", description: "The production API server" }]
|
||||
*/
|
||||
servers?: Server[];
|
||||
|
||||
/**
|
||||
* The available paths and operations for the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - paths} |
|
||||
*
|
||||
* @property `paths` - Optional The available paths and operations for the API
|
||||
*
|
||||
* @example { "/pets": { "get": { "summary": "List all pets", "responses": { "200": { "description": "A list of pets" } } } } }
|
||||
*/
|
||||
paths?: Paths;
|
||||
/**
|
||||
* The available paths and operations for the API.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - paths} |
|
||||
*
|
||||
* @property `paths` - Optional The available paths and operations for the API
|
||||
*
|
||||
* @example { "/pets": { "get": { "summary": "List all pets", "responses": { "200": { "description": "A list of pets" } } } } }
|
||||
*/
|
||||
paths?: Paths;
|
||||
|
||||
/**
|
||||
* The incoming webhooks that MAY be received as part of this API and that the
|
||||
* API consumer MAY choose to implement. Closely related to the `callbacks` feature,
|
||||
* this section describes requests initiated other than by an API call, for example
|
||||
* by an out of band registration.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - webhooks} |
|
||||
*
|
||||
* @property `webhooks` - Optional The incoming webhooks that MAY be received as part of this API
|
||||
*
|
||||
* @example { "newPet": { "post": { "requestBody": { "description": "Information about a new pet" } } } }
|
||||
*/
|
||||
webhooks?: Webhooks;
|
||||
/**
|
||||
* The incoming webhooks that MAY be received as part of this API and that the
|
||||
* API consumer MAY choose to implement. Closely related to the `callbacks` feature,
|
||||
* this section describes requests initiated other than by an API call, for example
|
||||
* by an out of band registration.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - webhooks} |
|
||||
*
|
||||
* @property `webhooks` - Optional The incoming webhooks that MAY be received as part of this API
|
||||
*
|
||||
* @example { "newPet": { "post": { "requestBody": { "description": "Information about a new pet" } } } }
|
||||
*/
|
||||
webhooks?: Webhooks;
|
||||
|
||||
/**
|
||||
* An element to hold various schemas for the document.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - components} |
|
||||
*
|
||||
* @property `components` - Optional An element to hold various schemas for the document
|
||||
*
|
||||
* @example { schemas: { Pet: { type: "object", properties: { id: { type: "integer" } } } } }
|
||||
*/
|
||||
components?: Components;
|
||||
/**
|
||||
* An element to hold various schemas for the document.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - components} |
|
||||
*
|
||||
* @property `components` - Optional An element to hold various schemas for the document
|
||||
*
|
||||
* @example { schemas: { Pet: { type: "object", properties: { id: { type: "integer" } } } } }
|
||||
*/
|
||||
components?: Components;
|
||||
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used across the API. The list
|
||||
* of values includes alternative security requirement objects that can be used.
|
||||
* Only one of the security requirement objects need to be satisfied to authorize
|
||||
* a request. Individual operations can override this definition.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - security} |
|
||||
*
|
||||
* @property `security` - Optional A declaration of which security mechanisms can be used across the API
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
/**
|
||||
* A declaration of which security mechanisms can be used across the API. The list
|
||||
* of values includes alternative security requirement objects that can be used.
|
||||
* Only one of the security requirement objects need to be satisfied to authorize
|
||||
* a request. Individual operations can override this definition.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - security} |
|
||||
*
|
||||
* @property `security` - Optional A declaration of which security mechanisms can be used across the API
|
||||
*
|
||||
* @example [{ "api_key": [] }]
|
||||
*/
|
||||
security?: SecurityRequirement[];
|
||||
|
||||
/**
|
||||
* A list of tags used by the document with additional metadata. The order of the
|
||||
* tags can be used to reflect on their order by the parsing tools. Not all tags
|
||||
* that are used by the Operation Object must be declared. The tags that are not
|
||||
* declared MAY be organized randomly or based on the tools' logic. Each tag name
|
||||
* in the list MUST be unique.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - tags} |
|
||||
*
|
||||
* @property `tags` - Optional A list of tags used by the document with additional metadata
|
||||
*
|
||||
* @example [{ name: "pets", description: "Pet store operations" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
/**
|
||||
* A list of tags used by the document with additional metadata. The order of the
|
||||
* tags can be used to reflect on their order by the parsing tools. Not all tags
|
||||
* that are used by the Operation Object must be declared. The tags that are not
|
||||
* declared MAY be organized randomly or based on the tools' logic. Each tag name
|
||||
* in the list MUST be unique.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - tags} |
|
||||
*
|
||||
* @property `tags` - Optional A list of tags used by the document with additional metadata
|
||||
*
|
||||
* @example [{ name: "pets", description: "Pet store operations" }]
|
||||
*/
|
||||
tags?: Tag[];
|
||||
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - externalDocs} |
|
||||
*
|
||||
* @property `externalDocs` - Optional Additional external documentation
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation.
|
||||
*
|
||||
* | Version | Reference |
|
||||
* |---|-----|
|
||||
* | 3.2.0 | {@link https://spec.openapis.org/oas/v3.2.0#openapi-object | OpenAPI 3.2.0 OpenAPI Object - externalDocs} |
|
||||
*
|
||||
* @property `externalDocs` - Optional Additional external documentation
|
||||
*
|
||||
* @example { description: "Find out more about our API", url: "https://example.com/docs" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
}
|
||||
|
||||
1970
3.2/status.ts
1970
3.2/status.ts
File diff suppressed because it is too large
Load Diff
42
3.2/tags.ts
42
3.2/tags.ts
@@ -54,27 +54,27 @@ import type { ExternalDocumentation } from "./externalDocs";
|
||||
* ```
|
||||
*/
|
||||
export interface Tag extends Extension {
|
||||
/**
|
||||
* The name of the tag. This field is required.
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the tag. This field is required.
|
||||
*
|
||||
* @example "users"
|
||||
* @example "pets"
|
||||
* @example "authentication"
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* A short description for the tag. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations"
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* A short description for the tag. CommonMark syntax MAY be used for rich text representation.
|
||||
*
|
||||
* @example "User management operations"
|
||||
* @example "Pet store operations"
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
/**
|
||||
* Additional external documentation for this tag.
|
||||
*
|
||||
* @example { description: "Find out more about user management", url: "https://example.com/docs/users" }
|
||||
*/
|
||||
externalDocs?: ExternalDocumentation;
|
||||
}
|
||||
|
||||
88
3.2/xml.ts
88
3.2/xml.ts
@@ -130,51 +130,51 @@ import type { Extension } from "./extensions";
|
||||
* ```
|
||||
*/
|
||||
export interface XML extends Extension {
|
||||
/**
|
||||
* The type of XML node this schema produces. Determines how the schema
|
||||
* is serialized to XML.
|
||||
*
|
||||
* - `"element"`: Produces an XML element node (may contain attributes, child elements, or text)
|
||||
* - `"attribute"`: Produces an XML attribute node on the containing element (value-only)
|
||||
* - `"text"`: Contributes character data of the containing element (PCDATA)
|
||||
* - `"cdata"`: Contributes a CDATA section of the containing element
|
||||
* - `"none"`: Does not directly produce a node (used for structural control, e.g., array wrappers)
|
||||
*
|
||||
* @example "element"
|
||||
* @example "attribute"
|
||||
* @example "text"
|
||||
* @example "cdata"
|
||||
* @example "none"
|
||||
*/
|
||||
nodeType?: "element" | "attribute" | "text" | "cdata" | "none";
|
||||
/**
|
||||
* The type of XML node this schema produces. Determines how the schema
|
||||
* is serialized to XML.
|
||||
*
|
||||
* - `"element"`: Produces an XML element node (may contain attributes, child elements, or text)
|
||||
* - `"attribute"`: Produces an XML attribute node on the containing element (value-only)
|
||||
* - `"text"`: Contributes character data of the containing element (PCDATA)
|
||||
* - `"cdata"`: Contributes a CDATA section of the containing element
|
||||
* - `"none"`: Does not directly produce a node (used for structural control, e.g., array wrappers)
|
||||
*
|
||||
* @example "element"
|
||||
* @example "attribute"
|
||||
* @example "text"
|
||||
* @example "cdata"
|
||||
* @example "none"
|
||||
*/
|
||||
nodeType?: "element" | "attribute" | "text" | "cdata" | "none";
|
||||
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* Only effective when `nodeType` is "element" or "attribute". When defined within
|
||||
* the Items Object (items), it will affect the name of the individual XML elements
|
||||
* within the list. When defined alongside type being array (outside the items),
|
||||
* it will affect the wrapping element name.
|
||||
*
|
||||
* @example "user"
|
||||
* @example "id"
|
||||
* @example "users"
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Replaces the name of the element/attribute used for the described schema property.
|
||||
* Only effective when `nodeType` is "element" or "attribute". When defined within
|
||||
* the Items Object (items), it will affect the name of the individual XML elements
|
||||
* within the list. When defined alongside type being array (outside the items),
|
||||
* it will affect the wrapping element name.
|
||||
*
|
||||
* @example "user"
|
||||
* @example "id"
|
||||
* @example "users"
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
* The URI of the namespace definition. This MUST be in the form of an absolute URI.
|
||||
* Only effective when `nodeType` is "element" or "attribute".
|
||||
*
|
||||
* @example "http://example.com/schema/user"
|
||||
* @example "http://www.w3.org/XML/1998/namespace"
|
||||
*/
|
||||
namespace?: string;
|
||||
/**
|
||||
* The URI of the namespace definition. This MUST be in the form of an absolute URI.
|
||||
* Only effective when `nodeType` is "element" or "attribute".
|
||||
*
|
||||
* @example "http://example.com/schema/user"
|
||||
* @example "http://www.w3.org/XML/1998/namespace"
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* The prefix to be used for the name. Only effective when `nodeType` is "element" or "attribute".
|
||||
*
|
||||
* @example "user"
|
||||
* @example "xml"
|
||||
*/
|
||||
prefix?: string;
|
||||
/**
|
||||
* The prefix to be used for the name. Only effective when `nodeType` is "element" or "attribute".
|
||||
*
|
||||
* @example "user"
|
||||
* @example "xml"
|
||||
*/
|
||||
prefix?: string;
|
||||
}
|
||||
|
||||
17
License.ts
17
License.ts
@@ -18,8 +18,7 @@ type OpenEnum<T extends string> = T | (string & { __openEnum?: never });
|
||||
* @see {@link https://spdx.org/licenses/ | SPDX License List}
|
||||
* @see {@link https://www.npmjs.com/package/spdx-license-list | spdx-license-list NPM Package}
|
||||
*/
|
||||
export type KnownLicenseNames =
|
||||
(typeof spdxLicenseList)[keyof typeof spdxLicenseList]["name"];
|
||||
export type KnownLicenseNames = (typeof spdxLicenseList)[keyof typeof spdxLicenseList]["name"];
|
||||
|
||||
/**
|
||||
* Known license SPDX Identifiers.
|
||||
@@ -40,13 +39,13 @@ export type KnownLicenseIdentifiers = keyof typeof spdxLicenseList;
|
||||
* @see {@link https://www.npmjs.com/package/spdx-license-list | spdx-license-list NPM Package}
|
||||
*/
|
||||
export type KnownLicenseURLs = {
|
||||
[K in keyof typeof spdxLicenseList]: (typeof spdxLicenseList)[K] extends {
|
||||
url: infer U;
|
||||
}
|
||||
? U extends string
|
||||
? U
|
||||
: never
|
||||
: never;
|
||||
[K in keyof typeof spdxLicenseList]: (typeof spdxLicenseList)[K] extends {
|
||||
url: infer U;
|
||||
}
|
||||
? U extends string
|
||||
? U
|
||||
: never
|
||||
: never;
|
||||
}[keyof typeof spdxLicenseList];
|
||||
|
||||
/**
|
||||
|
||||
157
README.md
157
README.md
@@ -48,13 +48,13 @@ The build process creates JSON schemas for:
|
||||
|
||||
```typescript
|
||||
// Import schemas for a specific version
|
||||
import { schemas } from 'oas-types/schemas/3.0';
|
||||
import { schemas } from "oas-types/schemas/3.0";
|
||||
|
||||
// Import all schemas
|
||||
import { allSchemas } from 'oas-types/schemas';
|
||||
import { allSchemas } from "oas-types/schemas";
|
||||
|
||||
// Use with JSON Schema validators
|
||||
import Ajv from 'ajv';
|
||||
import Ajv from "ajv";
|
||||
const ajv = new Ajv();
|
||||
const validator = ajv.compile(schemas.specification);
|
||||
```
|
||||
@@ -65,66 +65,42 @@ const validator = ajv.compile(schemas.specification);
|
||||
|
||||
```typescript
|
||||
// OpenAPI 3.2.0 (latest)
|
||||
import {
|
||||
Specification,
|
||||
Info,
|
||||
Paths,
|
||||
Schema,
|
||||
Components
|
||||
} from 'oas-types/3.2';
|
||||
import { Specification, Info, Paths, Schema, Components } from "oas-types/3.2";
|
||||
|
||||
// OpenAPI 3.1.x
|
||||
import {
|
||||
Specification,
|
||||
Info,
|
||||
Paths,
|
||||
Schema,
|
||||
Components
|
||||
} from 'oas-types/3.1';
|
||||
import { Specification, Info, Paths, Schema, Components } from "oas-types/3.1";
|
||||
|
||||
// OpenAPI 3.0.x
|
||||
import {
|
||||
Specification,
|
||||
Info,
|
||||
Paths,
|
||||
Schema,
|
||||
Components
|
||||
} from 'oas-types/3.0';
|
||||
import { Specification, Info, Paths, Schema, Components } from "oas-types/3.0";
|
||||
|
||||
// Swagger 2.0
|
||||
import {
|
||||
Swagger,
|
||||
Info,
|
||||
Paths,
|
||||
Schema,
|
||||
Definitions
|
||||
} from 'oas-types/2.0';
|
||||
import { Swagger, Info, Paths, Schema, Definitions } from "oas-types/2.0";
|
||||
```
|
||||
|
||||
### Import Specific OpenAPI Objects
|
||||
|
||||
```typescript
|
||||
// Import specific objects from any version
|
||||
import { Info, Contact, License } from 'oas-types/3.1/info';
|
||||
import { Paths, Operation, Parameter } from 'oas-types/3.1/paths';
|
||||
import { Schema, StringSchema, ObjectSchema } from 'oas-types/3.1/schema';
|
||||
import { SecurityScheme, OAuthFlows } from 'oas-types/3.1/security';
|
||||
import { Info, Contact, License } from "oas-types/3.1/info";
|
||||
import { Paths, Operation, Parameter } from "oas-types/3.1/paths";
|
||||
import { Schema, StringSchema, ObjectSchema } from "oas-types/3.1/schema";
|
||||
import { SecurityScheme, OAuthFlows } from "oas-types/3.1/security";
|
||||
```
|
||||
|
||||
### Import Schema Data Types
|
||||
|
||||
```typescript
|
||||
// Import specific schema types for any version
|
||||
import {
|
||||
StringSchema,
|
||||
NumberSchema,
|
||||
IntegerSchema,
|
||||
import {
|
||||
StringSchema,
|
||||
NumberSchema,
|
||||
IntegerSchema,
|
||||
BooleanSchema,
|
||||
ArraySchema,
|
||||
ArraySchema,
|
||||
ObjectSchema,
|
||||
CompositionSchema,
|
||||
ReferenceSchema
|
||||
} from 'oas-types/3.1/data-types';
|
||||
ReferenceSchema,
|
||||
} from "oas-types/3.1/data-types";
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
@@ -190,19 +166,25 @@ openapi-types/
|
||||
## Philosophy
|
||||
|
||||
### Version-Specific Implementations
|
||||
|
||||
Each OpenAPI version has its own complete implementation that accurately reflects the specification for that version. This ensures:
|
||||
|
||||
- **Type accuracy** - Types match the exact specification requirements
|
||||
- **Version compatibility** - No confusion between different OpenAPI versions
|
||||
- **Future-proofing** - Easy to add new versions without breaking existing ones
|
||||
|
||||
### Modular Organization
|
||||
|
||||
Types are organized by OpenAPI object type, making it easy to:
|
||||
|
||||
- Import only what you need
|
||||
- Understand the structure of OpenAPI specifications
|
||||
- Maintain and update specific object types
|
||||
|
||||
### Comprehensive Documentation
|
||||
|
||||
Every type includes:
|
||||
|
||||
- **JSDoc comments** with detailed descriptions
|
||||
- **Links to official specifications** for each OpenAPI version
|
||||
- **Usage examples** showing practical implementations
|
||||
@@ -220,7 +202,7 @@ Every type includes:
|
||||
### Basic OpenAPI 3.1.x Usage
|
||||
|
||||
```typescript
|
||||
import { Specification, Info, Paths, Schema } from 'oas-types/3.1';
|
||||
import { Specification, Info, Paths, Schema } from "oas-types/3.1";
|
||||
|
||||
const openApiSpec: Specification = {
|
||||
openapi: "3.1.0",
|
||||
@@ -230,12 +212,12 @@ const openApiSpec: Specification = {
|
||||
description: "A sample API",
|
||||
contact: {
|
||||
name: "API Support",
|
||||
email: "support@example.com"
|
||||
email: "support@example.com",
|
||||
},
|
||||
license: {
|
||||
name: "MIT",
|
||||
identifier: "MIT"
|
||||
}
|
||||
identifier: "MIT",
|
||||
},
|
||||
} as Info,
|
||||
paths: {
|
||||
"/users": {
|
||||
@@ -248,27 +230,22 @@ const openApiSpec: Specification = {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "array",
|
||||
items: { $ref: "#/components/schemas/User" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} as Paths
|
||||
items: { $ref: "#/components/schemas/User" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as Paths,
|
||||
};
|
||||
```
|
||||
|
||||
### Schema Definitions (OpenAPI 3.1.x)
|
||||
|
||||
```typescript
|
||||
import {
|
||||
StringSchema,
|
||||
ObjectSchema,
|
||||
ArraySchema,
|
||||
Schema
|
||||
} from 'oas-types/3.1';
|
||||
import { StringSchema, ObjectSchema, ArraySchema, Schema } from "oas-types/3.1";
|
||||
|
||||
// String schema with validation
|
||||
const nameSchema: StringSchema = {
|
||||
@@ -276,7 +253,7 @@ const nameSchema: StringSchema = {
|
||||
minLength: 1,
|
||||
maxLength: 100,
|
||||
pattern: "^[a-zA-Z\\s]+$",
|
||||
description: "User's full name"
|
||||
description: "User's full name",
|
||||
};
|
||||
|
||||
// Object schema with properties
|
||||
@@ -285,13 +262,13 @@ const userSchema: ObjectSchema = {
|
||||
properties: {
|
||||
id: { type: "integer" },
|
||||
name: nameSchema,
|
||||
email: {
|
||||
type: "string",
|
||||
format: "email"
|
||||
}
|
||||
email: {
|
||||
type: "string",
|
||||
format: "email",
|
||||
},
|
||||
},
|
||||
required: ["id", "name", "email"],
|
||||
description: "User object"
|
||||
description: "User object",
|
||||
};
|
||||
|
||||
// Array schema
|
||||
@@ -299,21 +276,21 @@ const usersSchema: ArraySchema = {
|
||||
type: "array",
|
||||
items: userSchema,
|
||||
minItems: 1,
|
||||
description: "Array of users"
|
||||
description: "Array of users",
|
||||
};
|
||||
```
|
||||
|
||||
### Swagger 2.0 Usage
|
||||
|
||||
```typescript
|
||||
import { Swagger, Info, Paths } from 'oas-types/2.0';
|
||||
import { Swagger, Info, Paths } from "oas-types/2.0";
|
||||
|
||||
const swaggerSpec: Swagger = {
|
||||
swagger: "2.0",
|
||||
info: {
|
||||
title: "My API",
|
||||
version: "1.0.0",
|
||||
description: "A sample API"
|
||||
description: "A sample API",
|
||||
} as Info,
|
||||
paths: {
|
||||
"/users": {
|
||||
@@ -324,36 +301,36 @@ const swaggerSpec: Swagger = {
|
||||
description: "A list of users",
|
||||
schema: {
|
||||
type: "array",
|
||||
items: { $ref: "#/definitions/User" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
items: { $ref: "#/definitions/User" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as Paths,
|
||||
definitions: {
|
||||
User: {
|
||||
type: "object",
|
||||
properties: {
|
||||
id: { type: "integer" },
|
||||
name: { type: "string" }
|
||||
name: { type: "string" },
|
||||
},
|
||||
required: ["id", "name"]
|
||||
}
|
||||
}
|
||||
required: ["id", "name"],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### Security Schemes
|
||||
|
||||
```typescript
|
||||
import { SecurityScheme, OAuthFlows } from 'oas-types/3.1/security';
|
||||
import { SecurityScheme, OAuthFlows } from "oas-types/3.1/security";
|
||||
|
||||
const apiKeyAuth: SecurityScheme = {
|
||||
type: "apiKey",
|
||||
in: "header",
|
||||
name: "X-API-Key",
|
||||
description: "API key authentication"
|
||||
description: "API key authentication",
|
||||
};
|
||||
|
||||
const oauth2Auth: SecurityScheme = {
|
||||
@@ -364,10 +341,10 @@ const oauth2Auth: SecurityScheme = {
|
||||
tokenUrl: "https://example.com/oauth/token",
|
||||
scopes: {
|
||||
"read:users": "Read user information",
|
||||
"write:users": "Modify user information"
|
||||
}
|
||||
}
|
||||
} as OAuthFlows
|
||||
"write:users": "Modify user information",
|
||||
},
|
||||
},
|
||||
} as OAuthFlows,
|
||||
};
|
||||
```
|
||||
|
||||
@@ -382,6 +359,7 @@ const oauth2Auth: SecurityScheme = {
|
||||
## Documentation
|
||||
|
||||
Each type includes comprehensive JSDoc documentation with:
|
||||
|
||||
- **Official specification links** for each OpenAPI version
|
||||
- **Usage examples** with practical implementations
|
||||
- **Property documentation** with example values and constraints
|
||||
@@ -391,22 +369,26 @@ Each type includes comprehensive JSDoc documentation with:
|
||||
## Key Features
|
||||
|
||||
### OpenAPI 3.2.0 Specific Features
|
||||
|
||||
- **Latest OpenAPI specification** - Full support for OpenAPI 3.2.0 features
|
||||
- **Enhanced OAuth flows** - Support for all OAuth 2.0 flow types
|
||||
- **Advanced webhook support** - Comprehensive webhook definitions
|
||||
|
||||
### OpenAPI 3.1.x Specific Features
|
||||
|
||||
- **JSON Schema 2020-12 alignment** - Full support for latest JSON Schema features
|
||||
- **Discriminated schema unions** - Type-safe schema type discrimination
|
||||
- **Composition schemas** - Support for `allOf`, `anyOf`, `oneOf`, `not`, `if`/`then`/`else`
|
||||
- **Enhanced validation** - Support for `const`, `examples`, and advanced validation keywords
|
||||
|
||||
### OpenAPI 3.0.x Features
|
||||
|
||||
- **Nullable schemas** - Support for `nullable` property
|
||||
- **Discriminator objects** - Support for schema discrimination
|
||||
- **Callback objects** - Support for webhook definitions
|
||||
|
||||
### Swagger 2.0 Features
|
||||
|
||||
- **Definitions object** - Support for schema definitions
|
||||
- **Security definitions** - Support for security schemes
|
||||
- **Response definitions** - Support for reusable response definitions
|
||||
@@ -414,6 +396,7 @@ Each type includes comprehensive JSDoc documentation with:
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please ensure that:
|
||||
|
||||
- All types follow the OpenAPI specification exactly
|
||||
- JSDoc documentation is complete and accurate
|
||||
- Version compatibility is maintained
|
||||
@@ -428,4 +411,4 @@ MIT License - see LICENSE file for details.
|
||||
- [OpenAPI Specification](https://spec.openapis.org/)
|
||||
- [Swagger Specification](https://swagger.io/specification/)
|
||||
- [JSON Schema](https://json-schema.org/)
|
||||
- [SPDX License List](https://spdx.org/licenses/)
|
||||
- [SPDX License List](https://spdx.org/licenses/)
|
||||
|
||||
6796
SPDXLicenseList.ts
6796
SPDXLicenseList.ts
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user