Package com.wordnik.swagger.model

Examples of com.wordnik.swagger.model.Parameter


        commandExecutor.execute(commandList, parameterContext);

        Map<String, Object> result = parameterContext.getResult();

        if (!shouldExpand(methodParameter)) {
          Parameter parameter = new Parameter(
                  (String) result.get("name"),
                  toOption(result.get("description")),
                  toOption(result.get("defaultValue")),
                  (Boolean) result.get("required"),
                  (Boolean) result.get("allowMultiple"),
View Full Code Here


  }

  private Parameter defaultParameter() {
    AllowableValues allowable = allowableValues(Optional.<String>absent(), field);

    return new Parameter(
            isNullOrEmpty(parentName) ? field.getName() : String.format("%s.%s", parentName, field.getName()),
            toOption(null), //description
            toOption(null), //default value
            Boolean.FALSE,  //required
            Boolean.FALSE,  //allow multiple
View Full Code Here

  private Parameter fromApiParam(ApiParam apiParam) {
    String allowableProperty = emptyToNull(apiParam.allowableValues());
    AllowableValues allowable = allowableValues(fromNullable(allowableProperty), field);

    return new Parameter(
            isNullOrEmpty(parentName) ? field.getName() : String.format("%s.%s", parentName, field.getName()),
            toOption(apiParam.value()),
            toOption(apiParam.defaultValue()),
            apiParam.required(),
            apiParam.allowMultiple(),
View Full Code Here

  }

  private Parameter fromApiModelProperty(ApiModelProperty apiModelProperty) {
    String allowableProperty = emptyToNull(apiModelProperty.allowableValues());
    AllowableValues allowable = allowableValues(fromNullable(allowableProperty), field);
    return new Parameter(
            isNullOrEmpty(parentName) ? field.getName() : String.format("%s.%s", parentName, field.getName()),
            toOption(apiModelProperty.value()),
            toOption(null), //default value
            apiModelProperty.required(),
            Boolean.FALSE,  //allow multiple
View Full Code Here

    }

    @Override
    public Parameter toSwaggerModel() {
        AllowableValues a = allowableValues == null ? null : allowableValues.toSwaggerModel();
        return new Parameter(name, Utils.getOption(description), Utils.getOption(defaultValue),required, allowMultiple,
                dataType, a, paramType, Utils.getOption(paramAccess));
    }
View Full Code Here

TOP

Related Classes of com.wordnik.swagger.model.Parameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.