Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSchema ¶
ExtractSchema converts a field map using shorthand schema syntax into OpenAPI v3 JSON Schema.
This is the primary API for converting ComponentType/Trait schemas from the compact shorthand format into full JSON Schema that Kubernetes can validate against.
The shorthand syntax allows concise schema definitions:
- Basic types: replicas: "integer"
- With constraints: port: "integer | minimum=1 | maximum=65535"
- With defaults: environment: "string | default=dev"
- Arrays: tags: "[]string"
- Maps: labels: "map<string>"
- Custom types: database: "DatabaseConfig" (references types parameter)
The types parameter provides custom type definitions that can be referenced in field schemas.
Schema behavior:
- Fields are required by default unless they have a default value
- Unknown markers cause errors unless they have an allowedUnknownMarkerPrefixes prefix (reserved for custom annotations)
- The "required" marker is not allowed (use defaults to make fields optional)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.