Pretty much:

 

type: object

additionalProperties:

  type: string

 

 

 

From: <[email protected]> on behalf of E <[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Friday, 19 May 2017 at 12:29
To: Swagger <[email protected]>
Subject: Request body object where keys and values are both user-specified

 

I have a link model with only two parameters, id and url. My API can create 
links from hashes where each key represents an id and the value represents the 
url. So the following: 

 

{

  "10" => "http://example.com";,
  "11" => "http://google.com";,
  "12" => "http://yahoo.com";, 

}

 

Sent to the correct endpoint will create 3 links, with IDs 10, 11, and 12.

 

I'm unsure of how to represent this in the "parameters" section of Swagger? Is 
it even possible?

 

-- 
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