toStructuralSchema
Function: toStructuralSchema()
toStructuralSchema(
schema,definitions?):StructuralSchema
Defined in: kubernetes/src/crd/schema.ts:287
Convert a JSON schema (draft 7, as generated for the models) to a structural schema for a CustomResourceDefinition
$refare inlined (recursive references become free-form values),definitionsand$schemadroppedallOfbranches are merged,anyOf/oneOfwith one non-null branch become that branch (nullable), integer or string becomesx-kubernetes-int-or-string, other alternatives free-form valuesconstbecomesenum,nulltypes and values becomenullableadditionalProperties: falseis dropped (Kubernetes prunes unknown fields), free-form objects and untyped values keep unknown fieldsdefault, unknown formats and keywords Kubernetes does not support are dropped
Parameters
schema
JSONSchema7
the JSON schema
definitions?
Definitions
definitions to resolve $ref with, default to the schema's
Returns
the structural schema