Tabnine Logo
SchemaMeta.getSwagger
Code IndexAdd Tabnine to your IDE (free)

How to use
getSwagger
method
in
io.servicecomb.core.definition.SchemaMeta

Best Java code snippets using io.servicecomb.core.definition.SchemaMeta.getSwagger (Showing top 4 results out of 315)

origin: io.servicecomb/java-chassis-core

public void init(SchemaMeta schemaMeta, Method method, String operationPath, String httpMethod,
  Operation swaggerOperation) {
 this.schemaMeta = schemaMeta;
 schemaQualifiedName = schemaMeta.getSchemaId() + "." + method.getName();
 microserviceQualifiedName = schemaMeta.getMicroserviceName() + "." + schemaQualifiedName;
 this.operationPath = operationPath;
 this.method = method;
 this.httpMethod = httpMethod.toUpperCase(Locale.US);
 this.swaggerOperation = swaggerOperation;
 executor = ExecutorManager.findExecutor(this);
 collectMethodType();
 responsesMeta.init(schemaMeta.getMicroserviceMeta().getClassLoader(),
   schemaMeta.getPackageName(),
   schemaMeta.getSwagger(),
   swaggerOperation,
   method.getGenericReturnType());
}
origin: io.servicecomb/java-chassis-core

 public void init() throws Exception {
  for (ProducerProvider provider : producerProviderList) {
   provider.init();
  }

  Microservice microservice = RegistryUtils.getMicroservice();
  MicroserviceMeta microserviceMeta = microserviceMetaManager.getOrCreateMicroserviceMeta(microservice);
  for (SchemaMeta schemaMeta : microserviceMeta.getSchemaMetas()) {
   String content = SchemaUtils.swaggerToString(schemaMeta.getSwagger());
   microservice.addSchema(schemaMeta.getSchemaId(), content);
  }
 }
}
origin: io.servicecomb/common-rest

public void init(OperationMeta operationMeta) {
 this.operationMeta = operationMeta;
 Swagger swagger = operationMeta.getSchemaMeta().getSwagger();
 Operation operation = operationMeta.getSwaggerOperation();
 this.produces = operation.getProduces();
 if (produces == null) {
  this.produces = swagger.getProduces();
 }
 this.createProduceProcessors();
 Method method = operationMeta.getMethod();
 Type[] genericParamTypes = method.getGenericParameterTypes();
 if (genericParamTypes.length != operation.getParameters().size()) {
  throw new Error("Param count is not equal between swagger and method,  path=" + absolutePath);
 }
 // 初始化所有rest param
 for (int idx = 0; idx < genericParamTypes.length; idx++) {
  Parameter parameter = operation.getParameters().get(idx);
  Type genericParamType = genericParamTypes[idx];
  if ("formData".equals(parameter.getIn())) {
   formData = true;
  }
  RestParam param = new RestParam(idx, parameter, genericParamType);
  addParam(param);
 }
 setAbsolutePath(concatPath(swagger.getBasePath(), operationMeta.getOperationPath()));
}
origin: io.servicecomb/java-chassis-core

public SchemaMeta getOrCreateProducerSchema(String microserviceName, String schemaId,
  Class<?> producerClass,
  Object producerInstance) {
 MicroserviceMeta microserviceMeta = microserviceMetaManager.getOrCreateMicroserviceMeta(microserviceName);
 ProducerSchemaContext context = new ProducerSchemaContext();
 context.setMicroserviceMeta(microserviceMeta);
 context.setSchemaId(schemaId);
 context.setProviderClass(producerClass);
 context.setProducerInstance(producerInstance);
 SchemaMeta schemaMeta = getOrCreateSchema(context);
 SwaggerProducer producer = swaggerEnv.createProducer(producerInstance, schemaMeta.getSwagger());
 for (OperationMeta operationMeta : schemaMeta.getOperations()) {
  SwaggerProducerOperation producerOperation = producer.findOperation(operationMeta.getOperationId());
  operationMeta.putExtData(Const.PRODUCER_OPERATION, producerOperation);
 }
 return schemaMeta;
}
io.servicecomb.core.definitionSchemaMetagetSwagger

Popular methods of SchemaMeta

  • ensureFindOperation
  • getMicroserviceMeta
  • getMicroserviceName
  • getOperations
  • getSchemaId
  • getSwaggerIntf
  • <init>
  • createOperationMgr
  • getConsumerHandlerChain
  • getMicroserviceQualifiedName
  • getName
  • getPackageName
  • getName,
  • getPackageName,
  • getProviderHandlerChain,
  • initOperations,
  • setConsumerHandlerChain,
  • setProviderHandlerChain

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • Path (java.nio.file)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now