So again, you can’t define groups of parameters.

You can define individual parameters, and reference them one by one from the 
different paths.

 

Take a look at 
https://github.com/OAI/OpenAPI-Specification/blob/master/guidelines/REUSE.md 
for more details.

 

 

 

From: 'Philipp' via Swagger <swagger-swaggersocket@googlegroups.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, 13 June 2017 at 1:10
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: Re: How to define a set of standard parameters for each path item

 

I have a set of data, that should be send as parameter in every single path and 
I only want to describe them only once. It does not matter if it is designed as 
a group of parameters that can be referenced by every path, or the data is 
included in one object and I describe one referencable parameter which contains 
the object, or...
It should be something like this (textual style):

// see first example in my first post, here I have the problem that 
myStandardParameter can not be refrerenced, only parameter1 and parameter2 can 
be referenced
parameters:
  myStandardParameter:
    name: parameter1
      type: string
    name: parameter2
      type: ptring

// alternative parameters
// see secon example in my first post. I was not able to define a reusable 
parameter that contains an objectItem/schema, I always get a mysterious error 
(see comment in the mentioned example)
parameters:
  myStandardParameter:
    name: myStandardParameter
      object:
        attribute1: string
        attribute2: string

/path:
  ...
  parameters:
    ref myStandardParameters
    name AdditionalParameter1
      type: string
    name: AdditionalParameter2
      type: string
...


I hope, it is more clear now. Thanks.

Am Dienstag, 13. Juni 2017 02:44:20 UTC+2 schrieb Ron: 

Maybe I misunderstood – are you asking what’s the right way to define a 
reusable (single) parameter, or whether there’s a way to group a number of 
parameters and reference them as a whole group once in different paths? 

-- 
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
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 swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to