Autogenerated forms using metadata
We facilitate they way to insert metadata when you create entities, we autogenerate forms based on JSON schemas to create components that will be reflected on the dashboard interface when you create a namespace, application or release specifications.
Regardless of the schema you create, we will autogenerate the input fields based on the schema, including required fields, validations, read-only properties or even enums.
It also supports creation of multiple forms for those entities by specifying multiple schemas.
Example using namespace to autogenerate forms
Using namespace entity, you can create a metadata specification to see a
form at https://{my-organization}.nullplatform.io/namespace/new
route.
For example, using two specification schemas
{
"entity": "namespace",
"metadata": "description",
"nrn": "organization=1255165411",
"name": "Brief description of namespace",
"schema": {
"type": "string"
}
}
{
"entity": "namespace",
"metadata": "general",
"nrn": "organization=1255165411",
"name": "Some information about the namespace",
"schema": {
"type": "object",
"properties": {
"country": {
"type": "array",
"description": "Where this project will be worked",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1,
"description": "A country in ISO format"
}
},
"platform": {
"type": "array",
"description": "Our available platforms are `microservice`, `web`, `mobile`, `other`",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"channel": {
"type": "string",
"description": "Our available channels are `all`, `engineer`, `others`"
},
"maintainers": {
"type": "array",
"description": "Main maintainers of the project",
"minItems": 1,
"items": {
"type": "string"
}
},
"internalNumbers": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
}
}
}
This generates the following forms in the section Additional information
in the creation of a namespace:
If some fields have requirements that you previously created, they will be validated according to the schema.
Using the example description
, country
or platform
have some rules, so if you don't add information, it will fail
when you create a namespace.