Description
In resource form you should be able to pass schema instaed of schemaID, which is used to download schema.
Reasons
In non-extensibility forms, the schema is fetched and is available to be taken from context. There is no need to create schemaID and pass it down to EditorWrapper.
In the future we can remove fetching of schema from EditorWrapper, which make this component to do one thing less.
Attachments
// readonly schema ID, set only once
const resourceSchemaId = useMemo(
() => resource?.apiVersion + '/' + resource?.kind,
[], // eslint-disable-line react-hooks/exhaustive-deps
);
...
<EditorWrapper
...
schemaId={resourceSchemaId}
/>
Description In resource form you should be able to pass
schema
instaed ofschemaID
, which is used to downloadschema
.Reasons In non-extensibility forms, the schema is fetched and is available to be taken from context. There is no need to create
schemaID
and pass it down toEditorWrapper
. In the future we can remove fetching of schema fromEditorWrapper
, which make this component to do one thing less.Attachments