sdaschner / jaxrs-analyzer

Creates REST documentation for JAX-RS projects
Apache License 2.0
319 stars 101 forks source link

JAX-RS query parameters should map to optional parameters #116

Open abstratt opened 7 years ago

abstratt commented 7 years ago

JAX-RS query parameters are optional by default - right? It seems the Analyzer declares them as required parameters in Swagger, and apparently thanks to #55 the only way to make them optional is to declare a default value (say, "").

That seems incorrect, and prevents valid existing JAX-RS code to be accessed based on the Swagger specification generated by jaxrs-analyzer-maven-plugin.

Please make QueryParams map to optional parameters in Swagger by default. You can use Bean validations (#45) if you want to map extra metadata.