Search in sources :

Example 1 with ProducerProvider

use of io.servicecomb.core.ProducerProvider in project java-chassis by ServiceComb.

the class ProducerProviderManager method init.

public void init() throws Exception {
    for (ProducerProvider provider : producerProviderList) {
        provider.init();
    }
    MicroserviceMeta microserviceMeta = microserviceMetaManager.getOrCreateMicroserviceMeta(RegistryUtils.getMicroservice().getServiceName());
    for (SchemaMeta schemaMeta : microserviceMeta.getSchemaMetas()) {
        String content = SchemaUtils.swaggerToString(schemaMeta.getSwagger());
        RegistryUtils.getMicroservice().addSchema(schemaMeta.getSchemaId(), content);
    }
}
Also used : ProducerProvider(io.servicecomb.core.ProducerProvider) SchemaMeta(io.servicecomb.core.definition.SchemaMeta) MicroserviceMeta(io.servicecomb.core.definition.MicroserviceMeta)

Aggregations

ProducerProvider (io.servicecomb.core.ProducerProvider)1 MicroserviceMeta (io.servicecomb.core.definition.MicroserviceMeta)1 SchemaMeta (io.servicecomb.core.definition.SchemaMeta)1