0

I want to define a JSON schema which produce the following object

{
  "key_1": FooObject,
  "key_2": FooObject,
}

Is it possible to define such schema with Swagger?

So I want to be able to have X number of the key_X number without having to predefine how many it will be, since it can be arbitrary many.

MySwaggerSchema:
  type: object
  properties:
    key_1:
      type: object
      $ref: "/path/to/FooObject/schema"
starcorn
  • 7,681
  • 22
  • 79
  • 122

0 Answers0