类 ParameterBuilder

java.lang.Object
springfox.documentation.builders.ParameterBuilder

public class ParameterBuilder extends Object
  • 构造器详细资料

    • ParameterBuilder

      public ParameterBuilder()
  • 方法详细资料

    • name

      public ParameterBuilder name(String name)
      Updates the parameter name
      参数:
      name - - name of the parameter
      返回:
      this
    • description

      public ParameterBuilder description(String description)
      Updates the description of the parameter
      参数:
      description - - description
      返回:
      this
    • defaultValue

      public ParameterBuilder defaultValue(String defaultValue)
      Updates the default value of the parameter
      参数:
      defaultValue - - default value
      返回:
      this
    • required

      public ParameterBuilder required(boolean required)
      Updates if the parameter is required or optional
      参数:
      required - - flag to indicate if the parameter is required
      返回:
      this
    • allowMultiple

      public ParameterBuilder allowMultiple(boolean allowMultiple)
      Updates if the parameter should allow multiple values
      参数:
      allowMultiple - - flag to indicate if the parameter supports multi-value
      返回:
      this
    • allowableValues

      public ParameterBuilder allowableValues(AllowableValues allowableValues)
      Updates if the parameter is bound by a range of values or a range of numerical values
      参数:
      allowableValues - - allowable values (instance of @see springfox.documentation.service.AllowableListValues or @see springfox.documentation.service.AllowableRangeValues)
      返回:
      this
    • parameterType

      public ParameterBuilder parameterType(String paramType)
      Updates the type of parameter
      参数:
      paramType - - Could be header, cookie, body, query etc.
      返回:
      this
    • parameterAccess

      public ParameterBuilder parameterAccess(String paramAccess)
      Updates the parameter access
      参数:
      paramAccess - - parameter access
      返回:
      this
    • type

      public ParameterBuilder type(com.fasterxml.classmate.ResolvedType type)
      Updates the type of parameter
      参数:
      type - - represents the resolved type of the parameter
      返回:
      this
    • modelRef

      public ParameterBuilder modelRef(ModelReference modelRef)
      Represents the convenience method to infer the model reference Consolidate or figure out whats can be rolled into the other.
      参数:
      modelRef - model reference
      返回:
      this
    • hidden

      public ParameterBuilder hidden(boolean hidden)
      Updates if the parameter is hidden
      参数:
      hidden - - flag to indicate if the parameter is hidden
      返回:
      this
    • vendorExtensions

      public ParameterBuilder vendorExtensions(List<VendorExtension> extensions)
      Updates the parameter extensions
      参数:
      extensions - - parameter extensions
      返回:
      this
    • collectionFormat

      public ParameterBuilder collectionFormat(String collectionFormat)
      Updates the parameter extensions
      参数:
      collectionFormat - - parameter collection format
      返回:
      this
      从以下版本开始:
      2.8.0
    • allowEmptyValue

      public ParameterBuilder allowEmptyValue(Boolean allowEmptyValue)
      Updates the flag that allows sending empty values for this parameter
      参数:
      allowEmptyValue - - true/false
      返回:
      this
      从以下版本开始:
      2.8.1
    • order

      public ParameterBuilder order(int order)
      Updates default order of precedence of parameters
      参数:
      order - - between Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCE
      返回:
      this
      从以下版本开始:
      2.8.1
    • pattern

      public ParameterBuilder pattern(String pattern)
    • scalarExample

      public ParameterBuilder scalarExample(Object scalarExample)
      参数:
      scalarExample - example for non-body parameters
      返回:
      this
      从以下版本开始:
      2.8.1
    • complexExamples

      public ParameterBuilder complexExamples(com.google.common.collect.Multimap<String,Example> examples)
      参数:
      examples - example for body parameters
      返回:
      this
      从以下版本开始:
      2.8.1
    • build

      public Parameter build()