@maxhealth.tech/prefab / auto / fieldsFromJsonSchema
Function: fieldsFromJsonSchema()
ts
function fieldsFromJsonSchema(schema, options?): AutoFormField[];Defined in: auto/schema.ts:265
Derive autoForm fields from a JSON Schema object.
Returns an empty list for anything that is not an object schema with properties, so a caller can hand over whatever a route declared and branch on the result rather than pre-checking the shape.
Parameters
| Parameter | Type |
|---|---|
schema | unknown |
options? | FieldsFromJsonSchemaOptions |