Skip to content

Permit to pass the FULL JSON Schema and not only properties #201

@EmilianoBruni

Description

@EmilianoBruni

Here you "build" the JSON Schema based on rootSchema and schema

conf/source/index.ts

Lines 107 to 111 in 655f87c

const schema: JSONSchema = {
...options.rootSchema,
type: 'object',
properties: options.schema,
};

I don't understand why it is necessary to build the schema in this way and not allow the entire schema to be passed directly

As an example your "build" fails in my JSON schema where I don't have root properties because I don't know key names but only values.

In this case I need a JSON schema like this

{
   "type":"object",
   "patternProperties":{
      "^.*$":{
         "type":"object",
         "properties":{
            "schedule":{
               "type":"string"
            },
            "timezone":{
               "type":"string"
            },
            "start":{
               "type":"boolean",
               "default":true
            }
         }
      }
   }
}

which obviously fail in your JSON schema constructing and I don't know I to pass it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions