public class ParameterBuilder extends Object
| 构造器和说明 |
|---|
ParameterBuilder() |
| 限定符和类型 | 方法和说明 |
|---|---|
ParameterBuilder |
allowableValues(AllowableValues allowableValues)
Updates if the parameter is bound by a range of values or a range of numerical values
|
ParameterBuilder |
allowEmptyValue(Boolean allowEmptyValue)
Updates the flag that allows sending empty values for this parameter
|
ParameterBuilder |
allowMultiple(boolean allowMultiple)
Updates if the parameter should allow multiple values
|
Parameter |
build() |
ParameterBuilder |
collectionFormat(String collectionFormat)
Updates the parameter extensions
|
ParameterBuilder |
complexExamples(com.google.common.collect.Multimap<String,Example> examples) |
ParameterBuilder |
defaultValue(String defaultValue)
Updates the default value of the parameter
|
ParameterBuilder |
description(String description)
Updates the description of the parameter
|
ParameterBuilder |
hidden(boolean hidden)
Updates if the parameter is hidden
|
ParameterBuilder |
modelRef(ModelReference modelRef)
Represents the convenience method to infer the model reference
Consolidate or figure out whats can be rolled into the other.
|
ParameterBuilder |
name(String name)
Updates the parameter name
|
ParameterBuilder |
order(int order)
Updates default order of precedence of parameters
|
ParameterBuilder |
parameterAccess(String paramAccess)
Updates the parameter access
|
ParameterBuilder |
parameterType(String paramType)
Updates the type of parameter
|
ParameterBuilder |
pattern(String pattern) |
ParameterBuilder |
required(boolean required)
Updates if the parameter is required or optional
|
ParameterBuilder |
scalarExample(Object scalarExample) |
ParameterBuilder |
type(com.fasterxml.classmate.ResolvedType type)
Updates the type of parameter
|
ParameterBuilder |
vendorExtensions(List<VendorExtension> extensions)
Updates the parameter extensions
|
public ParameterBuilder name(String name)
name - - name of the parameterpublic ParameterBuilder description(String description)
description - - descriptionpublic ParameterBuilder defaultValue(String defaultValue)
defaultValue - - default valuepublic ParameterBuilder required(boolean required)
required - - flag to indicate if the parameter is requiredpublic ParameterBuilder allowMultiple(boolean allowMultiple)
allowMultiple - - flag to indicate if the parameter supports multi-valuepublic ParameterBuilder allowableValues(AllowableValues allowableValues)
allowableValues - - allowable values (instance of @see springfox.documentation.service.AllowableListValues
or @see springfox.documentation.service.AllowableRangeValues)public ParameterBuilder parameterType(String paramType)
paramType - - Could be header, cookie, body, query etc.public ParameterBuilder parameterAccess(String paramAccess)
paramAccess - - parameter accesspublic ParameterBuilder type(com.fasterxml.classmate.ResolvedType type)
type - - represents the resolved type of the parameterpublic ParameterBuilder modelRef(ModelReference modelRef)
modelRef - model referencepublic ParameterBuilder hidden(boolean hidden)
hidden - - flag to indicate if the parameter is hiddenpublic ParameterBuilder vendorExtensions(List<VendorExtension> extensions)
extensions - - parameter extensionspublic ParameterBuilder collectionFormat(String collectionFormat)
collectionFormat - - parameter collection formatpublic ParameterBuilder allowEmptyValue(Boolean allowEmptyValue)
allowEmptyValue - - true/falsepublic ParameterBuilder order(int order)
order - - between Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCEpublic ParameterBuilder pattern(String pattern)
public ParameterBuilder scalarExample(Object scalarExample)
scalarExample - example for non-body parameterspublic ParameterBuilder complexExamples(com.google.common.collect.Multimap<String,Example> examples)
examples - example for body parameterspublic Parameter build()
Copyright © 2023. All rights reserved.