2

It's possible to define a parameter into the parameters section, under components section into an OPEN API sheet. At the same time it's possible to reference that parameter into a path, under the responses section.

What I want to do, it's E.G. having a parameter "include" of type array override only the section enum of the schema part, from the paths section referencing the one in the components one.

It seems the allOf directive it's not allowed in that context, is there a way to do that? Probably I just need an example.

Example:

In the components.parameters section:

- name: include
  in: query
  description: relationships to include
  type: array
  style: form
  explode: true
  schema: 
     type: array
     items:
        type: string

In the paths. .. parameters section:

- name: include
  in: query
  description: relationships to include
  type: array
  style: form
  explode: true
  schema: 
     type: array
     items:
        type: string
        enum: [legs, owner]           

I would like to redefine only the enum section and not

Michele Carino
  • 1,043
  • 2
  • 11
  • 25
  • There's no "responses.parameters" section in OpenAPI. Do you mean response schema (`responses..content..schema`)? Also, the last sentence in your question is unfinished - "and not" what? – Helen Apr 15 '19 at 07:49
  • You are right not in the responses section but in the path one. – Michele Carino Apr 17 '19 at 05:58

0 Answers0