@scalar/types
Version:
Types to work with Scalar packages
75 lines • 1.89 kB
TypeScript
/**
* This file is autogenerated. Do not edit it.
*
* Generated at: 2026-05-20T20:41:54.922Z
*/
/**
* Display name for additional properties on a schema object.
*
* @example
* ```yaml
* x-additionalPropertiesName: metadata
* ```
*/
export type XAdditionalPropertiesName = {
/** Human-readable label for additional properties on this schema */
'x-additionalPropertiesName'?: string;
};
/**
* Descriptions for enum values. Keys must match enum values.
*
* @example
* ```yaml
* x-enumDescriptions:
* other: Other reason
* ```
*/
export type XEnumDescriptions = {
/** Map or list of descriptions keyed by enum value (camelCase spelling) */
'x-enumDescriptions'?: Record<string, string> | string[];
/** Map or list of descriptions keyed by enum value (kebab-case spelling) */
'x-enum-descriptions'?: Record<string, string> | string[];
};
/**
* Display names for enum values. Must match the order of the `enum` array.
*
* @example
* ```yaml
* enum: [moon, asteroid]
* x-enum-varnames: [Moon, Asteroid]
* ```
*/
export type XEnumVarNames = {
/** Display names for enum values (same order as `enum`) */
'x-enum-varnames'?: string[];
/** Alias for x-enum-varnames — display names for enum values */
'x-enumNames'?: string[];
};
/**
* Named examples attached to a schema. Keys are example names; values are the example payloads.
*
* @example
* ```yaml
* x-examples:
* user:
* id: 1
* name: Ada
* ```
*/
export type XExamples = {
/** Map of example name to example value */
'x-examples'?: Record<string, any>;
};
/**
* References a variable for schema property substitution in the API client.
*
* @example
* ```yaml
* x-variable: userId
* ```
*/
export type XVariable = {
/** Variable name used for substitution in the API client */
'x-variable'?: string;
};
//# sourceMappingURL=index.d.ts.map