Parameters can be referenced only one at a time. You’d need to define several 
parameters and reference each one of them individually.

Currently, there’s no support for referencing a group of parameters.

 

 

 

From: <[email protected]> on behalf of 
"[email protected]" <[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Friday, May 11, 2018 at 16:48
To: Swagger <[email protected]>
Subject: Understanding the usage of components and $refs

 

I am trying to reference a component for my parameters because i will be using 
it a lot. But it does not output the form in the description area.

Here is what it looks like

components:

  parameters:

    Query:

      - in: "query"

        name: "with[]"

        schema:

          type: "array"

        required: false

      - in: "query"

        name: "find[key]"

        schema:

          type: "array"

        required: false

      - in: "query"

        name: "find[value]"

        schema:

          type: "array"

        required: false

  

paths:

  /customers:

    get:

      summary: Checks if the server is alive

      parameters:

      - $ref: '#/components/parameters/Query'

      responses:

        405:

          description: "Invalid input"

        200:

          description: "Success"

 

And here is a picture. Can anyone tell me whats going on. Maybe what i am doing 
wrong?




-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to