Defining complex schemas


I have a question about how to accomplish two goals when defining my schema, inspired by this response type:

  1. How to define an array within a schema. Do I just put an array in as a value, and populate it with a single instance of the value that should populate the array? Could I !include a schema within an array to imply an array of models?

  2. How to define an object within a schema? This one seems to be represented in the schema documentation example, but with just little enough detail to leave me wondering if I get it.

I think it’d be great if both of these types were included in the spec as valid namedParameter types. Is it for any of the implementations you’re using?


I am working on similar situation as #1 that is listed. I believe array can be listed inside a schema as

            "$schema": "",
             "type": "object"
            "Cutomers": [{
              "Name": "string",
              "id": "long",
              "email": "string",


I don’t think schema with an element can be included multiple times to make it an array. So

schema: [schemaName]

might not work.