
com.reprezen.genflow.swagger.doc.ParamsDoc Maven / Gradle / Ivy
The newest version!
/**
* Copyright © 2013, 2016 Modelsolv, Inc.
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property
* of ModelSolv, Inc. See the file license.html in the root directory of
* this project for further information.
*/
package com.reprezen.genflow.swagger.doc;
import com.reprezen.genflow.swagger.doc.HelperHelper;
import com.reprezen.genflow.swagger.doc.StructureTable;
import io.swagger.models.Swagger;
import io.swagger.models.parameters.Parameter;
import java.util.List;
import org.eclipse.xtend2.lib.StringConcatenation;
@SuppressWarnings("all")
public class ParamsDoc {
private final Swagger swagger = HelperHelper.getSwagger();
public CharSequence paramsHtml(final List params) {
CharSequence _xifexpression = null;
boolean _isEmpty = params.isEmpty();
boolean _not = (!_isEmpty);
if (_not) {
CharSequence _xblockexpression = null;
{
final StructureTable table = StructureTable.get(this.swagger, new String[] { "name", "Name" }, new String[] { "in", "In" }, new String[] { "default", "Default" },
new String[] { "type", "Type" }, new String[] { "doc", "Description" });
StringConcatenation _builder = new StringConcatenation();
_builder.append("");
_builder.newLine();
_builder.append(" ");
_builder.append("Parameters
");
_builder.newLine();
_builder.append(" ");
String _render = table.render(params, null, null);
_builder.append(_render, " ");
_builder.newLineIfNotEmpty();
_builder.append(" ");
_builder.newLine();
_xblockexpression = _builder;
}
_xifexpression = _xblockexpression;
}
return _xifexpression;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy