mirror of
https://github.com/LukeHagar/openapi-types.git
synced 2025-12-07 20:47:47 +00:00
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:
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user