busola icon indicating copy to clipboard operation
busola copied to clipboard

Introduce extension schema validation

Open Wawrzyn321 opened this issue 2 years ago • 10 comments

Description

Make it possible to validate the current extension configuration against the schema, which would need to be updated by us on code-change basis. We should use this validation to guide the user while editing an extension on our ConfigMap edit view.

As a base we could use "schema-*.json" files in /core/src/assets/customResources.

Snipped from our code (removed)

  const ajv = new Ajv();
  if (!ajv.validate(extensibilitySchemas?.details, resMetaData?.details)) {
    throwConfigError(t('extensibility.configuration-error'), { error: ajv.errors });
  }

Wawrzyn321 avatar Sep 28 '22 08:09 Wawrzyn321