Refactor OpenAPI schemas and type definitions across versions 2.0, 3.0, and 3.1 for improved clarity and consistency. Update example files and tests to align with the latest specifications. Adjust package dependencies and enhance README documentation for better guidance on usage and testing.

This commit is contained in:
Luke Hagar
2025-09-30 20:36:16 +00:00
parent 4a82aa3b32
commit 3e81d0b30d
100 changed files with 141724 additions and 157789 deletions

View File

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