Java Code Examples for org.apache.cxf.jaxrs.swagger.Swagger2Feature#setDescription()
The following examples show how to use
org.apache.cxf.jaxrs.swagger.Swagger2Feature#setDescription() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RestOrderApplication.java From camelinaction2 with Apache License 2.0 | 6 votes |
@Override public Set<Object> getSingletons() { Swagger2Feature swagger = new Swagger2Feature(); swagger.setBasePath("/"); swagger.setHost("localhost:9000"); swagger.setTitle("Order Service"); swagger.setDescription("Rider Auto Parts Order Service"); swagger.setVersion("2.0.0"); swagger.setContact("[email protected]"); swagger.setPrettyPrint(true); Set<Object> answer = new HashSet<>(); answer.add(orderService); answer.add(new JacksonJsonProvider()); answer.add(swagger); // to turn on verbose logging answer.add(new LoggingFeature()); return answer; }
Example 2
Source File: AbstractSwagger2ServiceDescriptionTest.java From cxf with Apache License 2.0 | 5 votes |
protected Swagger2Feature createSwagger2Feature() { final Swagger2Feature feature = new Swagger2Feature(); feature.setRunAsFilter(runAsFilter); feature.setContact(CONTACT); feature.setTitle(TITLE); feature.setDescription(DESCRIPTION); feature.setLicense(LICENSE); feature.setLicenseUrl(LICENSE_URL); feature.setSecurityDefinitions(Collections.singletonMap(SECURITY_DEFINITION_NAME, new io.swagger.models.auth.BasicAuthDefinition())); return feature; }
Example 3
Source File: SwaggerToOpenApiConversionTest.java From cxf with Apache License 2.0 | 5 votes |
protected Swagger2Feature createSwagger2Feature() { final Swagger2Feature feature = new Swagger2Feature(); feature.setContact(CONTACT); feature.setTitle(TITLE); feature.setDescription(DESCRIPTION); feature.setLicense(LICENSE); feature.setLicenseUrl(LICENSE_URL); feature.setSecurityDefinitions(Collections.singletonMap(SECURITY_DEFINITION_NAME, new io.swagger.models.auth.BasicAuthDefinition())); return feature; }
Example 4
Source File: WebServicesConfiguration.java From microservices-transactions-tcc with Apache License 2.0 | 4 votes |
@Bean public Server rsServer() { JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean(); endpoint.setBus(bus); endpoint.setAddress("/"); endpoint.setProviders(Arrays.asList(new JacksonJsonProvider(), new ExceptionRestHandler())); Map<Object, Object> mappings = new HashMap<Object, Object>(); mappings.put("json", "application/json"); endpoint.setExtensionMappings(mappings); Swagger2Feature swagger2Feature = new Swagger2Feature(); swagger2Feature.setTitle(title); swagger2Feature.setDescription(description); swagger2Feature.setVersion(version); swagger2Feature.setContact(contact); swagger2Feature.setSchemes(schemes.split(",")); swagger2Feature.setBasePath(basePath); swagger2Feature.setResourcePackage(resourcePackage); swagger2Feature.setPrettyPrint(prettyPrint); swagger2Feature.setScan(scan); endpoint.setFeatures(Arrays.asList(new LoggingFeature(), swagger2Feature)); endpoint.setServiceBeans(Arrays.asList(tccCoordinatorService, compositeController)); return endpoint.create(); }