Prettier formatting

This commit is contained in:
Luke Hagar
2025-10-01 19:33:18 +00:00
parent 9aca409a38
commit 5685fc2796
166 changed files with 35810 additions and 49685 deletions

View File

@@ -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;
}