本文整理了Java中io.swagger.models.Swagger.getParameters()
方法的一些代码示例,展示了Swagger.getParameters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Swagger.getParameters()
方法的具体详情如下:
包路径:io.swagger.models.Swagger
类名称:Swagger
方法名:getParameters
暂无
代码示例来源:origin: apache/servicecomb-java-chassis
public OperationGenerator(SwaggerGenerator swaggerGenerator, Method providerMethod) {
this.swaggerGenerator = swaggerGenerator;
this.swagger = swaggerGenerator.swagger;
this.operation = new Operation();
this.providerMethod = providerMethod;
this.context = swaggerGenerator.context;
if (swagger.getParameters() != null) {
methodAnnotationParameters.addAll(swagger.getParameters().values());
}
}
代码示例来源:origin: org.apache.servicecomb/swagger-generator-core
public OperationGenerator(SwaggerGenerator swaggerGenerator, Method providerMethod) {
this.swaggerGenerator = swaggerGenerator;
this.swagger = swaggerGenerator.swagger;
this.operation = new Operation();
this.providerMethod = providerMethod;
this.context = swaggerGenerator.context;
if (swagger.getParameters() != null) {
methodAnnotationParameters.addAll(swagger.getParameters().values());
}
}
代码示例来源:origin: com.reprezen.genflow/openapi-diagram
public SwaggerDiagramTypes(final Swagger model) {
this.sharedParams = this._xtendHelper.<String, Parameter>safe(model.getParameters());
}
代码示例来源:origin: io.syndesis.rest/rest-connector-generator
static void addGlobalParameters(final Connector.Builder builder, final Swagger swagger) {
final Map<String, Parameter> globalParameters = swagger.getParameters();
if (globalParameters != null) {
globalParameters.forEach((name, parameter) -> {
createPropertyFromParameter(parameter).ifPresent(property -> {
builder.putProperty(name, property);
});
});
}
}
代码示例来源:origin: io.syndesis/connector-generator
/* default */ static void addGlobalParameters(final Connector.Builder builder, final Swagger swagger) {
final Map<String, Parameter> globalParameters = swagger.getParameters();
if (globalParameters != null) {
globalParameters.forEach((name, parameter) -> {
createPropertyFromParameter(parameter).ifPresent(property -> {
builder.putProperty(name, property);
});
});
}
}
代码示例来源:origin: io.syndesis.server/server-connector-generator
static void addGlobalParameters(final Connector.Builder builder, final Swagger swagger) {
final Map<String, Parameter> globalParameters = swagger.getParameters();
if (globalParameters != null) {
globalParameters.forEach((name, parameter) -> {
createPropertyFromParameter(parameter).ifPresent(property -> {
builder.putProperty(name, property);
});
});
}
}
代码示例来源:origin: io.syndesis.server/server-api-generator
static void addGlobalParameters(final Connector.Builder builder, final Swagger swagger) {
final Map<String, Parameter> globalParameters = swagger.getParameters();
if (globalParameters != null) {
globalParameters.forEach((name, parameter) -> {
createPropertyFromParameter(parameter).ifPresent(property -> {
builder.putProperty(name, property);
});
});
}
}
代码示例来源:origin: io.swagger/swagger-parser
private Object loadInternalRef(String ref) {
Object result = null;
if(ref.startsWith("#/definitions")) {
result = getFromMap(ref, swagger.getParameters(), PARAMETER_PATTERN);
}
else if(ref.startsWith("#/responses")) {
result = getFromMap(ref, swagger.getResponses(), RESPONSE_PATTERN);
}
else if(ref.startsWith("#/parameters")) {
result = getFromMap(ref, swagger.getParameters(), PARAMETER_PATTERN);
}
else if(ref.startsWith("#/paths")) {
result = getFromMap(ref, swagger.getPaths(), PATHS_PATTERN);
}
if (result == null) {
result = getFromMap(ref, swagger.getDefinitions(), DEFINITION_PATTERN);
}
return result;
}
代码示例来源:origin: com.reprezen.genflow/swagger-doc
switch (refType) {
case PARAMETER:
_switchResult_1 = this.swagger.getParameters().get(simpleRef);
break;
case DEFINITION:
代码示例来源:origin: outofcoffee/imposter
securityDefinitions.putAll(getOrEmpty(spec.getSecurityDefinitions()));
definitions.putAll(getOrEmpty(spec.getDefinitions()));
parameters.putAll(getOrEmpty(spec.getParameters()));
responses.putAll(getOrEmpty(spec.getResponses()));
代码示例来源:origin: com.reprezen.genflow/genflow-api
if (swagger.getParameters() != null) {
for (Entry<String, Parameter> param : swagger.getParameters().entrySet()) {
callbacks.topLevelParamter(param.getKey(), param.getValue());
callbacks.any(param.getValue());
代码示例来源:origin: AresS31/swurg
logger.info("Produces: " + swagger.getProduces());
logger.info("Paths: " + swagger.getPaths());
logger.info("Parameters: " + swagger.getParameters());
代码示例来源:origin: swagger-api/swagger-parser
if (swagger.getParameters() != null) {
globalV2Parameters.putAll(swagger.getParameters());
swagger.getParameters().forEach((k, v) -> {
if ("body".equals(v.getIn())) {
components.addRequestBodies(k, convertParameterToRequestBody(v));
代码示例来源:origin: io.swagger.parser.v3/swagger-parser-v2-converter
if (swagger.getParameters() != null) {
globalV2Parameters.putAll(swagger.getParameters());
swagger.getParameters().forEach((k, v) -> {
if ("body".equals(v.getIn())) {
components.addRequestBodies(k, convertParameterToRequestBody(v));
代码示例来源:origin: org.openapitools.swagger.parser/swagger-parser-v2-converter
if (swagger.getParameters() != null) {
globalV2Parameters.putAll(swagger.getParameters());
swagger.getParameters().forEach((k, v) -> {
if ("body".equals(v.getIn())) {
components.addRequestBodies(k, convertParameterToRequestBody(v));
代码示例来源:origin: com.reprezen.genflow/swagger-doc
public CharSequence getHtml() {
CharSequence _xblockexpression = null;
final Parameter param = this.swagger.getParameters().get(this.name);
StringConcatenation _builder = new StringConcatenation();
_builder.append("<a class=\"anchor toc-entry\" id=\"");
_builder.newLine();
_builder.append(" ");
CharSequence _paramHtml = this.paramHtml(this.swagger.getParameters().get(this.name));
_builder.append(_paramHtml, " ");
_builder.newLineIfNotEmpty();
代码示例来源:origin: com.reprezen.genflow/genflow-api
@Override
public void swagger(Swagger swagger) {
swagger.setSchemes(fillList(swagger.getSchemes()));
swagger.setConsumes(fillList(swagger.getConsumes()));
swagger.setProduces(fillList(swagger.getProduces()));
swagger.setPaths(fillMap(swagger.getPaths()));
swagger.setDefinitions(fillMap(swagger.getDefinitions()));
swagger.setParameters(fillMap(swagger.getParameters()));
swagger.setResponses(fillMap(swagger.getResponses()));
swagger.setSecurityDefinitions(fillMap(swagger.getSecurityDefinitions()));
swagger.setSecurity(fillList(swagger.getSecurity()));
swagger.setTags(fillList(swagger.getTags()));
}
代码示例来源:origin: com.reprezen.genflow/swagger-doc
_builder.newLine();
List<String> _sortByPosition = this.miscHelper.<String, Parameter>sortByPosition(swagger.getParameters().keySet(), swagger.getParameters());
for(final String param : _sortByPosition) {
_builder.append(" ");
代码示例来源:origin: com.reprezen.genflow/swagger-doc
final boolean showPaths = (!_isEmpty);
final boolean showDefs = (((!(preview).booleanValue()) || (!showPaths)) && (!swagger.getDefinitions().isEmpty()));
final boolean showParams = (((!(preview).booleanValue()) || (!showPaths)) && (!swagger.getParameters().isEmpty()));
final boolean showResponses = (((!(preview).booleanValue()) || (!showPaths)) && (!swagger.getResponses().isEmpty()));
final boolean includeTOC = ((!(preview).booleanValue()) && (this.optionHelper.isIncludeTOC()).booleanValue());
内容来源于网络,如有侵权,请联系作者删除!