-
Story
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
True
-
-
False
-
XCMSTRAT-458 - Support YAML config file for ROSA cluster create in both UI and CLI
-
(11/13) lack of definition
-
-
-
OCMUI Core Sprint 259, OCMUI Core Sprint 260, OCMUI Core Sprint 261, OCMUI Core Sprint 262
Validate the YAML, some example code using ajv:
const Ajv = require('ajv'); const addFormats = require('ajv-formats'); const openApiSchema = require('./openapi/clusters_mgmt.v1.json'); const example = require('./src/schema/example.json'); try { const ajv = new Ajv({ strict: false, allErrors: true, verbose: true }) addFormats(ajv) ajv.addSchema(openApiSchema, "API.yaml") const validate = ajv.validate({ "$ref": "API.yaml#/components/schemas/Cluster" }, example) console.log({ valid: validate, error: ajv.errors, errorText: ajv.errorsText(), }) } catch (error) { console.error(error.message) }
- depends on
-
OCMUI-2396 YAML editor - code editor
- Review