Closed lionkng123 closed 8 years ago
It seems, this plugin does neglect "required" property from defaultParamsQueryAll list in Config.groovy
defaultParamsQueryAll
Config.groovy
In Config.groovy:
grails.plugins.restapidoc.defaultParamsQueryAll = [ [name:"isValid",description:"Some description of 'isValid' query param", required: "true", type: "String"] ]
As per JSONDocUtilsLight, we are hard-coding required as false:
required
false
DEFAULT_PARAMS_QUERY_ALL.each { queryParameters.add(new RestApiParamDoc(it.name, it.description, it.type, "false", new String[0], Enum, "")) }
Is it expected behavior?
Shall we read this property from Config.groovy where default would be false?
default
Something like this:
DEFAULT_PARAMS_QUERY_ALL.each { queryParameters.add(new RestApiParamDoc(it.name, it.description, it.type, it.required ?: "false", new String[0], Enum, "")) }
Thank you
Yes, I commit the fix. Should be available in the next release.
It seems, this plugin does neglect "required" property from
defaultParamsQueryAll
list inConfig.groovy
In
Config.groovy
:As per JSONDocUtilsLight, we are hard-coding
required
asfalse
:Is it expected behavior?
Shall we read this property from
Config.groovy
wheredefault
would befalse
?Something like this:
Thank you