Optional query parameter?

11 views
Skip to first unread message

Alfred Moreno

unread,
May 17, 2018, 2:59:59 PM5/17/18
to Swagger
Hey all, I have the following operation:

/foo/bar:
get:
description: Foobar
operationId: GetFooBar
parameters:
- in: query
name: baz
schema:
type: array
items:
type: string
responses:
200:
description: OK
schema:
$ref: '#/definitions/Thing'


When my java client is generated, my function does not have the optional parameter.

/**
* Foobar
*
* @param baz
* @throws RestClientException when an error occurs. (TODO Elaborate on this)
*/
@Override
public Thing getFooBar(String baz) {



How can I get swagger to generate the function so that it won't require params?

I.e. public Thing getFooBar()
Reply all
Reply to author
Forward
0 new messages