Uploaded image for project: 'OpenShift CFE'
  1. OpenShift CFE
  2. CFE-21

JSON Schema Struct Generator

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Major Major
    • 2021Q3 Plan
    • None
    • None
    • CFE Sprint 205

      The cli tool configuration schema is defined in json schema: https://www.jsonschemavalidator.net/s/yVFwHCWE

      This is super helpful for validation and serialization/deserialization of yaml/json and it also lends well with documenting the schema.

      There are some tools to generate golang structs directly from the schema file - which we should leverage because it's a fairly big configuration.

      AC:

      • the makefile can generate the golang structs from the jsonschema (like openshift/api does for example with swagger)
      • the cli can validate the json schema and read it into generated structs as described in the design doc

              tjungblu@redhat.com Thomas Jungblut
              tjungblu@redhat.com Thomas Jungblut
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: