public String getDescription() { return parameter.getDescription(); }
String description = parameter.getDescription(); if (isNotBlank(description)) { markupDocBuilder.paragraph(markupDescription(config.getSwaggerMarkupLanguage(), markupDocBuilder, description));
public String getDescription() { return parameter.getDescription(); }
private String li_missingParam(Parameter param) { StringBuffer sb = new StringBuffer(""); sb.append("Delete ").append(param.getName()) .append(null == param.getDescription() ? "" : (" //" + param.getDescription())); return sb.toString(); }
private String li_addParam(Parameter param) { StringBuffer sb = new StringBuffer(""); sb.append("Add ").append(param.getName()) .append(null == param.getDescription() ? "" : (" //" + param.getDescription())); return sb.toString(); }
@Override public CodegenParameter fromParameter(Parameter param, Set<String> imports) { CodegenParameter parameter = super.fromParameter(param, imports); parameter.description = param.getDescription(); return parameter; }
private String li_changedParam(ChangedParameter changeParam) { boolean changeRequired = changeParam.isChangeRequired(); boolean changeDescription = changeParam.isChangeDescription(); Parameter rightParam = changeParam.getRightParameter(); Parameter leftParam = changeParam.getLeftParameter(); StringBuffer sb = new StringBuffer(""); sb.append(rightParam.getName()); if (changeRequired) { sb.append(" change into " + (rightParam.getRequired() ? "required" : "not required")); } if (changeDescription) { sb.append(" Notes ").append(leftParam.getDescription()).append(" change into ") .append(rightParam.getDescription()); } return sb.toString(); }
private ContainerTag li_addParam(Parameter param) { return li().withText("Add " + param.getName()).with(span(null == param.getDescription() ? "" : ("//" + param.getDescription())).withClass("comment")); }
private RequestBody convertParameterToRequestBody(io.swagger.models.parameters.Parameter param, List<String> consumes) { RequestBody body = new RequestBody(); BodyParameter bp = (BodyParameter) param; List<String> mediaTypes = new ArrayList<>(globalConsumes); if (consumes != null && consumes.size() > 0) { mediaTypes.clear(); mediaTypes.addAll(consumes); } if (mediaTypes.size() == 0) { mediaTypes.add("*/*"); } if (StringUtils.isNotBlank(param.getDescription())) { body.description(param.getDescription()); } body.required(param.getRequired()); Content content = new Content(); for (String type : mediaTypes) { content.addMediaType(type, new MediaType().schema( convert(bp.getSchema()))); if (StringUtils.isNotBlank(bp.getDescription())) { body.setDescription(bp.getDescription()); } } convertExamples(((BodyParameter) param).getExamples(), content); body.content(content); return body; }
private RequestBody convertParameterToRequestBody(io.swagger.models.parameters.Parameter param, List<String> consumes) { RequestBody body = new RequestBody(); BodyParameter bp = (BodyParameter) param; List<String> mediaTypes = new ArrayList<>(globalConsumes); if (consumes != null && consumes.size() > 0) { mediaTypes.clear(); mediaTypes.addAll(consumes); } if (mediaTypes.size() == 0) { mediaTypes.add("*/*"); } if (StringUtils.isNotBlank(param.getDescription())) { body.description(param.getDescription()); } body.required(param.getRequired()); Content content = new Content(); for (String type : mediaTypes) { content.addMediaType(type, new MediaType().schema( convert(bp.getSchema()))); if (StringUtils.isNotBlank(bp.getDescription())) { body.setDescription(bp.getDescription()); } } convertExamples(((BodyParameter) param).getExamples(), content); body.content(content); return body; }
private RequestBody convertParameterToRequestBody(io.swagger.models.parameters.Parameter param, List<String> consumes) { RequestBody body = new RequestBody(); BodyParameter bp = (BodyParameter) param; List<String> mediaTypes = new ArrayList<>(globalConsumes); if (consumes != null && consumes.size() > 0) { mediaTypes.clear(); mediaTypes.addAll(consumes); } if (mediaTypes.size() == 0) { mediaTypes.add("*/*"); } if (StringUtils.isNotBlank(param.getDescription())) { body.description(param.getDescription()); } body.required(param.getRequired()); Content content = new Content(); for (String type : mediaTypes) { content.addMediaType(type, new MediaType().schema( convert(bp.getSchema()))); if (StringUtils.isNotBlank(bp.getDescription())) { body.setDescription(bp.getDescription()); } } convertExamples(((BodyParameter) param).getExamples(), content); body.content(content); return body; }
private ContainerTag li_missingParam(Parameter param) { return li().withClass("missing").with(span("Delete")).with(del(param.getName())).with(span(null == param.getDescription() ? "" : ("//" + param.getDescription())).withClass("comment")); }
private ContainerTag li_changedParam(ChangedParameter changeParam) { boolean changeRequired = changeParam.isChangeRequired(); boolean changeDescription = changeParam.isChangeDescription(); Parameter rightParam = changeParam.getRightParameter(); Parameter leftParam = changeParam.getLeftParameter(); ContainerTag li = li().withText(rightParam.getName()); if (changeRequired) { li.withText(" change into " + (rightParam.getRequired() ? "required" : "not required")); } if (changeDescription) { li.withText(" Notes ").with(del(leftParam.getDescription()).withClass("comment")).withText(" change into ").with(span(span(null == rightParam.getDescription() ? "" : rightParam.getDescription()).withClass("comment"))); } return li; }
String description = rightPara.getDescription(); String oldPescription = leftPara.getDescription(); if (StringUtils.isBlank(description)) description = ""; if (StringUtils.isBlank(oldPescription)) oldPescription = "";
final String description = trimToNull(parameter.getDescription()); final boolean required = parameter.getRequired();
final String description = trimToNull(parameter.getDescription()); final boolean required = parameter.getRequired();
final String description = trimToNull(parameter.getDescription()); final boolean required = parameter.getRequired();
final String description = trimToNull(parameter.getDescription()); final boolean required = parameter.getRequired();
String description = parameter.getDescription(); if (isNotBlank(description)) { markupDocBuilder.paragraph(markupDescription(config.getSwaggerMarkupLanguage(), markupDocBuilder, description));
public CharSequence bodyParamHtml(final Parameter param) { CharSequence _xblockexpression = null; { final BodyParameter bodyParam = ((BodyParameter) param); StringConcatenation _builder = new StringConcatenation(); String _docHtml = this._docHelper.getDocHtml(param.getDescription()); _builder.append(_docHtml); _builder.newLineIfNotEmpty(); CharSequence _renderSchema = this._schemaHelper.renderSchema(bodyParam.getSchema()); _builder.append(_renderSchema); _builder.newLineIfNotEmpty(); CharSequence _renderExamples = this._examplesHelper.<String>renderExamples(bodyParam.getExamples()); _builder.append(_renderExamples); _builder.newLineIfNotEmpty(); _xblockexpression = _builder; } return _xblockexpression; }