cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice that allows any POST argument

New Contributor

Webservice that allows any POST argument

Hello,

I have a POST webservice that actually allows the user to send any kind of argument, in the form key1=value1&key2=value2&key3=value3...  where key1,key2, key3 are not known before.

I would like to know if this is supported by Swagger specification protocol.

 

If this matters, the webserver is developed with Java EE (JAX-RS), with Swagger 1.5.21.

 

 

4 REPLIES 4
Highlighted
Moderator

Re: Webservice that allows any POST argument

Are you talking about query parameter or parameters in the payload (form data)?

New Contributor

Re: Webservice that allows any POST argument

I'm talking about the payload (POST data).

Moderator

Re: Webservice that allows any POST argument

Just leave the schema of the request body empty. That would mean 'any' value.

New Contributor

Re: Webservice that allows any POST argument

Sorry, I dont' understand your answer. This is the content of my JSON Swagger declaration:

 

      "/Log/Insert":{ 
         "put":{
            "summary":"Insert generic logs",
            "operationId":"insertLog",
            "consumes":[ 
               "application/x-www-form-urlencoded"
            ],
            "produces":[ 
               "text/plain"
            ],
            "responses":{ 
               "200":{ 
                  "description":"successful operation",
                  "schema":{ 
                     "type":"integer",
                     "format":"int64"
                  }
               }
            }
         }
      },

what "request body" are you refering to?

Thank you.

 

New Here?
Join us and watch the welcome video:
Join our online event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win