@CompileStatic class OperationParameters extends java.lang.Object
The parameters of an operation: the variables of its path, the request parameters its action binds by name or through a command object, the paging of a listing, and the version asked for.
| Constructor and description |
|---|
OperationParameters(java.util.Collection<MappingContext> mappingContexts, ComponentSchemas schemas) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addCommandParameters(io.swagger.v3.oas.models.Operation operation, java.lang.Class<?> controllerType, java.lang.String actionName, java.util.List<java.lang.String> pathNames)A command object an action binds on a request without a body is bound from the request parameters, so each property it binds is a query parameter, sent under the name Grails binds it by, whatever name the command object is described with. |
|
static void |
addPagingParameters(io.swagger.v3.oas.models.Operation operation)The paging and sorting a listing accepts. |
|
void |
addPathParameters(io.swagger.v3.oas.models.Operation operation, UrlMapping mapping, java.util.List<java.lang.String> pathNames, java.lang.Class<?> controllerType, java.lang.String actionName, java.lang.Class<?> resourceType)Every variable the path declares needs a parameter, and nothing else does. |
|
void |
addRequestParameters(io.swagger.v3.oas.models.Operation operation, java.lang.Class<?> controllerType, java.lang.String actionName, java.util.List<java.lang.String> pathNames)The parameters of a simple type an action declares are bound from the request by name. |
|
static void |
addVersionParameter(io.swagger.v3.oas.models.Operation operation, java.lang.String version, boolean required)The version an operation answers, asked for with the Accept-Version header, and
required of any version but the one answered where none is asked for. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
A command object an action binds on a request without a body is bound from the request parameters, so each property it binds is a query parameter, sent under the name Grails binds it by, whatever name the command object is described with.
The paging and sorting a listing accepts. RestfulController passes the request parameters to GORM, so a listing answers to them whether or not a mapping mentions them.
Every variable the path declares needs a parameter, and nothing else does.
The parameters of a simple type an action declares are bound from the request by name.
The version an operation answers, asked for with the Accept-Version header, and
required of any version but the one answered where none is asked for.