@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
41 lines (40 loc) • 1.46 kB
JavaScript
/**
* Vendor extension keys used in JSON schemas and OpenAPI specifications.
*
* These keys are used as custom extension properties (prefixed with `x-` in OpenAPI)
* to store Ts.ED-specific metadata in generated schemas. Vendor extensions enable
* advanced features like generic type handling, group-based serialization, and
* nullable type support.
*
* ### Usage
*
* Vendor keys are automatically added to schemas by decorators and mappers.
* They preserve TypeScript type information and enable runtime schema transformations.
*
* ### Generic Type Keys
* - GENERIC_LABELS: Labels for generic type parameters
* - GENERIC_LABEL: Single generic type label
* - GENERIC_OF: Generic type reference
*
* ### Group Keys
* - GROUPS: Property group memberships
* - GROUPS_NAME: Named group identifier
* - FORWARD_GROUPS: Groups forwarded to nested properties
* - ALLOWED_GROUPS: Groups allowed for access
*
* ### Type Keys
* - NULLABLE: Marks a type as nullable
*
* @public
*/
export var VendorKeys;
(function (VendorKeys) {
VendorKeys["GENERIC_LABELS"] = "genericLabels";
VendorKeys["GENERIC_LABEL"] = "genericLabel";
VendorKeys["GENERIC_OF"] = "genericOf";
VendorKeys["NULLABLE"] = "nullable";
VendorKeys["FORWARD_GROUPS"] = "forwardGroups";
VendorKeys["GROUPS"] = "groups";
VendorKeys["GROUPS_NAME"] = "groupsName";
VendorKeys["ALLOWED_GROUPS"] = "allowedGroups";
})(VendorKeys || (VendorKeys = {}));