io.swagger.models.Swagger.model()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(171)

本文整理了Java中io.swagger.models.Swagger.model()方法的一些代码示例,展示了Swagger.model()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Swagger.model()方法的具体详情如下:
包路径:io.swagger.models.Swagger
类名称:Swagger
方法名:model

Swagger.model介绍

暂无

代码示例

代码示例来源:origin: kongchen/swagger-maven-plugin

response.schema(schema);
swagger.model(key, models.get(key));
swagger.model(entry.getKey(), entry.getValue());

代码示例来源:origin: kongchen/swagger-maven-plugin

.schema(responseProperty)
      .headers(defaultResponseHeaders));
  swagger.model(key, models.get(key));
swagger.model(entry.getKey(), entry.getValue());

代码示例来源:origin: kongchen/swagger-maven-plugin

.schema(responseProperty)
      .headers(defaultResponseHeaders));
  swagger.model(key, models.get(key));
swagger.model(entry.getKey(), entry.getValue());

代码示例来源:origin: tminglei/binder-swagger-java

public void scanAndRegisterNamedModels(Framework.Mapping<?> mapping) {
  synchronized (swagger) {
    mConverter.scanModels(mapping).forEach(p -> {
      Model existed = swagger.getDefinitions() == null ? null : swagger.getDefinitions().get(p.getKey());
      if (existed == null) swagger.model(p.getKey(), p.getValue());
      else if (!existed.equals(p.getValue())) {
        throw new IllegalArgumentException("CONFLICTED model definitions for '" + p.getKey() + "'!!!");
      }
    });
  }
}

代码示例来源:origin: io.swagger/swagger-jaxrs

private void appendModelsWithJsonView(Type type, JsonView annotation) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type, annotation);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: wso2/msf4j

private void appendModels(Type type) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: Sayi/swagger-dubbo

private static void appendModels(Swagger swagger, Type type) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: io.swagger/swagger-jaxrs

private void appendModels(Type type) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: yangfuhai/jboot

private static void appendModels(Swagger swagger, Type type) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: org.wso2.msf4j/msf4j-swagger

private void appendModels(Type type) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: javagossip/dorado

private void appendModels(Type type) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: noboomu/proteus

private void appendModels(Type type) {
     final Map<String, Model> models = ModelConverters.getInstance().readAll(type);
  
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: javagossip/dorado

private void appendModelsWithJsonView(Type type, JsonView annotation) {
  final Map<String, Model> models = ModelConverters.getInstance().readAll(type, annotation);
  for (Map.Entry<String, Model> entry : models.entrySet()) {
    swagger.model(entry.getKey(), entry.getValue());
  }
}

代码示例来源:origin: buremba/netty-rest

if (swagger != null) {
  for (String key : models.keySet()) {
    swagger.model(key, models.get(key));
if (swagger != null) {
  for (String key : models.keySet()) {
    swagger.model(key, models.get(key));

代码示例来源:origin: buremba/netty-rest

.schema(responseProperty)
      .headers(defaultResponseHeaders));
  swagger.model(name, model);
swagger.model(key, models.get(key));
swagger.addDefinition(key, models.get(key));
  for (String key : models.keySet()) {
    response.schema(new RefProperty().asDefault(key));
    swagger.model(key, models.get(key));

相关文章