π©Json schema support
This section describes JSON Schema support in the launcher.
Onyxia uses JSON Schema to dynamically create its service launch interface, often referred to as the "launcher." By defining parameters and configurations in JSON Schema, Onyxia can automatically generate forms and interfaces that guide users through setting up and deploying services.
The JSON Schema draft Onyxia follows is largely based on Draft 7, but it only implements a subset of the specification. This means that while Onyxiaβs schema supports many core features of Draft 7βlike data types, required fields, and basic validationsβit may not include every feature or validation option found in the full Draft 7 specification. This subset approach keeps the schema manageable and efficient for the specific needs of Onyxia's interface generation and deployment configurations. In the following section, youβll also see that Onyxia adds additional semantic layers.
Summary
String: Supports plain text input
Number / Integer: Allows numerical input.
Boolean: Renders a toggle.
Array: Supported for list-like inputs, often used for specifying multiple items (e.g., environments, tags). Onyxia provide a way to add or remove item.
Items: Onyxia supports homogenous arrays, where all items are expected to be of the same type.
Object: Forms the basis for grouping multiple fields together.
Properties: Each property in an object renders as an individual input element within the launcher.
String
Render
In Onyxiaβs JSON Schema implementation, string elements include various render
types to adjust the input style based on each fieldβs function, creating a more intuitive user experience. Here are the primary render
types supported for string fields:
Dropdown Selection (
render: "list"
): Displays a dropdown menu for selecting from a set of predefined values, which is useful for fields like software versions or configurations.Example with schema validation :
Example without schema validation (usefull if your chart are reused in other context and you want people to specify other value):
Password Field (
render: "password"
): Provides a masked input field to secure sensitive data, such as passwords or API keys.Multi-line Text (
render: "textarea"
): Creates a resizable, multi-line text box for longer text entries, such as configuration scripts or notes, enhancing readability and usability.Slider (
render: "slider"
): For numeric inputs (stored as strings),render: "slider"
allows users to select a value within a specified range using a slider, commonly used for resource allocation (e.g., CPU, memory). This includes additional attributes likesliderMin
,sliderMax
,sliderStep
, andsliderUnit
to configure the slider's behavior.
Last updated