The default input for a component configuration is a JSON text area.
If you define a JSON schema, we are able to display a nice form and
let the user to fill the JSON using a set of defined inputs.
Using the configuration schema also allows us to validate the user input on frontend.
JSON schemas are well documented on the json-schema.org website. For their developing and testing,
use, for example, JSON Editor available on-line (alternative).
Remember to list all configuration properties as required.
This is to make sure that the actual configuration will always contain all properties.
If you want a property to be optional, set a default value for it. The supported formatting options for
the editor are available in the official editor documentation.
Let’s assume your component accepts the following configuration:
This looks like an appropriate form:
The form above can be created using this JSON Schema: