io.swagger.jaxrs.config.SwaggerContextService Java Examples
The following examples show how to use
io.swagger.jaxrs.config.SwaggerContextService.
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: Bootstrap.java From openapi-generator with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache-2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #2
Source File: Bootstrap.java From openapi-generator with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache-2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #3
Source File: Bootstrap.java From openapi-generator with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache-2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #4
Source File: Bootstrap.java From openapi-generator with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache-2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #5
Source File: Bootstrap.java From openapi-generator with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache-2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #6
Source File: Bootstrap.java From exo-demo with MIT License | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("Swagger Server") .description("This is a simple API") .termsOfService("") .contact(new Contact() .email("[email protected]")) .license(new License() .name("Apache 2.0") .url("http://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #7
Source File: Bootstrap.java From swaggy-jenkins with MIT License | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("Jenkins API clients generated from Swagger / Open API specification") .termsOfService("") .contact(new Contact() .email("[email protected]")) .license(new License() .name("") .url("http://unlicense.org")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #8
Source File: Bootstrap.java From swagger-aem with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API") .termsOfService("") .contact(new Contact() .email("[email protected]")) .license(new License() .name("") .url("http://unlicense.org")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #9
Source File: Bootstrap.java From pravega with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("Swagger Server") .description("List of admin REST APIs for the pravega controller service.") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache 2.0") .url("http://www.apache.org/licenses/LICENSE-2.0")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #10
Source File: Bootstrap.java From openapi-generator with Apache License 2.0 | 6 votes |
@Override public void init(ServletConfig config) throws ServletException { Info info = new Info() .title("OpenAPI Server") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .termsOfService("") .contact(new Contact() .email("")) .license(new License() .name("Apache-2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); }
Example #11
Source File: SwaggerGenerator.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void generateSwaggerJson() throws Exception { Set<Class<?>> classes = new HashSet<>(endpointConfig.getClasses()); classes.add(CoreApi.class); Swagger swagger = new Reader(SwaggerConfigLocator.getInstance().getConfig(SwaggerContextService.CONFIG_ID_DEFAULT).configure(new Swagger())) .read(classes); Path path = Paths.get("./build/swagger/cb.json"); Files.createDirectories(path.getParent()); Files.writeString(path, Json.pretty(swagger)); }
Example #12
Source File: EndpointConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
@PostConstruct private void registerSwagger() throws IOException { BeanConfig swaggerConfig = new BeanConfig(); swaggerConfig.setTitle("Cloudbreak API"); swaggerConfig.setDescription(FileReaderUtils.readFileFromClasspath("swagger/cloudbreak-introduction")); swaggerConfig.setVersion(cbVersion); swaggerConfig.setSchemes(new String[]{"http", "https"}); swaggerConfig.setBasePath(CoreApi.API_ROOT_CONTEXT); swaggerConfig.setLicenseUrl("https://github.com/hortonworks/cloudbreak/blob/master/LICENSE"); swaggerConfig.setResourcePackage("com.sequenceiq.cloudbreak.api,com.sequenceiq.distrox.api,com.sequenceiq.flow.api,com.sequenceiq.authorization"); swaggerConfig.setScan(true); swaggerConfig.setContact("https://hortonworks.com/contact-sales/"); swaggerConfig.setPrettyPrint(true); SwaggerConfigLocator.getInstance().putConfig(SwaggerContextService.CONFIG_ID_DEFAULT, swaggerConfig); }
Example #13
Source File: SwaggerGenerator.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void generateSwaggerJson() throws Exception { Set<Class<?>> classes = new HashSet<>(endpointConfig.getClasses()); classes.add(AutoscaleApi.class); Swagger swagger = new Reader(SwaggerConfigLocator.getInstance().getConfig(SwaggerContextService.CONFIG_ID_DEFAULT).configure(new Swagger())) .read(classes); Path path = Paths.get("./build/swagger/autoscale.json"); Files.createDirectories(path.getParent()); Files.writeString(path, Json.pretty(swagger)); }
Example #14
Source File: EndpointConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
private void registerSwagger() throws IOException { BeanConfig beanConfig = new BeanConfig(); beanConfig.setTitle("Auto-scaling API"); beanConfig.setDescription(FileReaderUtils.readFileFromClasspath("swagger/auto-scaling-introduction")); beanConfig.setVersion(applicationVersion); beanConfig.setSchemes(new String[]{"http", "https"}); beanConfig.setBasePath(AutoscaleApi.API_ROOT_CONTEXT); beanConfig.setLicenseUrl("https://github.com/sequenceiq/cloudbreak/blob/master/LICENSE"); beanConfig.setResourcePackage("com.sequenceiq.periscope.api,com.sequenceiq.authorization"); beanConfig.setScan(true); beanConfig.setContact("https://hortonworks.com/contact-sales/"); beanConfig.setPrettyPrint(true); SwaggerConfigLocator.getInstance().putConfig(SwaggerContextService.CONFIG_ID_DEFAULT, beanConfig); }
Example #15
Source File: SwaggerGenerator.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void generateSwaggerJson() throws Exception { Set<Class<?>> classes = new HashSet<>(endpointConfig.getClasses()); classes.add(EnvironmentApi.class); Swagger swagger = new Reader(SwaggerConfigLocator.getInstance().getConfig(SwaggerContextService.CONFIG_ID_DEFAULT).configure(new Swagger())) .read(classes); Path path = Paths.get("./build/swagger/environment.json"); Files.createDirectories(path.getParent()); Files.writeString(path, Json.pretty(swagger)); }
Example #16
Source File: EndpointConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
private void registerSwagger() { BeanConfig swaggerConfig = new BeanConfig(); swaggerConfig.setTitle("Environment API"); swaggerConfig.setDescription("Environment operation related API."); swaggerConfig.setVersion(applicationVersion); swaggerConfig.setSchemes(new String[]{"http", "https"}); swaggerConfig.setBasePath(EnvironmentApi.API_ROOT_CONTEXT); swaggerConfig.setLicenseUrl("https://github.com/sequenceiq/cloudbreak/blob/master/LICENSE"); swaggerConfig.setResourcePackage("com.sequenceiq.environment.api,com.sequenceiq.flow.api,com.sequenceiq.authorization"); swaggerConfig.setScan(true); swaggerConfig.setContact("https://hortonworks.com/contact-sales/"); swaggerConfig.setPrettyPrint(true); SwaggerConfigLocator.getInstance().putConfig(SwaggerContextService.CONFIG_ID_DEFAULT, swaggerConfig); }
Example #17
Source File: SwaggerGenerator.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void generateSwaggerJson() throws Exception { Set<Class<?>> classes = new HashSet<>(endpointConfig.getClasses()); classes.add(FreeIpaApi.class); Swagger swagger = new Reader(SwaggerConfigLocator.getInstance().getConfig(SwaggerContextService.CONFIG_ID_DEFAULT).configure(new Swagger())) .read(classes); Path path = Paths.get("./build/swagger/freeipa.json"); Files.createDirectories(path.getParent()); Files.writeString(path, Json.pretty(swagger)); }
Example #18
Source File: EndpointConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
@PostConstruct private void registerSwagger() { BeanConfig swaggerConfig = new BeanConfig(); swaggerConfig.setTitle("FreeIPA API"); swaggerConfig.setDescription(""); swaggerConfig.setVersion(applicationVersion); swaggerConfig.setSchemes(new String[]{"http", "https"}); swaggerConfig.setBasePath(FreeIpaApi.API_ROOT_CONTEXT); swaggerConfig.setLicenseUrl("https://github.com/sequenceiq/cloudbreak/blob/master/LICENSE"); swaggerConfig.setResourcePackage("com.sequenceiq.freeipa.api,com.sequenceiq.flow.api,com.sequenceiq.authorization"); swaggerConfig.setScan(true); swaggerConfig.setContact("https://hortonworks.com/contact-sales/"); swaggerConfig.setPrettyPrint(true); SwaggerConfigLocator.getInstance().putConfig(SwaggerContextService.CONFIG_ID_DEFAULT, swaggerConfig); }
Example #19
Source File: SwaggerGenerator.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void generateSwaggerJson() throws Exception { Set<Class<?>> classes = new HashSet<>(endpointConfig.getClasses()); classes.add(SdxApi.class); Swagger swagger = new Reader(SwaggerConfigLocator.getInstance().getConfig(SwaggerContextService.CONFIG_ID_DEFAULT).configure(new Swagger())) .read(classes); Path path = Paths.get("./build/swagger/datalake.json"); Files.createDirectories(path.getParent()); Files.writeString(path, Json.pretty(swagger)); }
Example #20
Source File: EndpointConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
@PostConstruct private void registerSwagger() { BeanConfig swaggerConfig = new BeanConfig(); swaggerConfig.setTitle("Datalake API"); swaggerConfig.setDescription(""); swaggerConfig.setVersion(applicationVersion); swaggerConfig.setSchemes(new String[]{"http", "https"}); swaggerConfig.setBasePath(SdxApi.API_ROOT_CONTEXT); swaggerConfig.setLicenseUrl("https://github.com/sequenceiq/cloudbreak/blob/master/LICENSE"); swaggerConfig.setResourcePackage("com.sequenceiq.sdx.api,com.sequenceiq.flow.api,com.sequenceiq.authorization"); swaggerConfig.setScan(true); swaggerConfig.setContact("https://hortonworks.com/contact-sales/"); swaggerConfig.setPrettyPrint(true); SwaggerConfigLocator.getInstance().putConfig(SwaggerContextService.CONFIG_ID_DEFAULT, swaggerConfig); }
Example #21
Source File: SwaggerGenerator.java From cloudbreak with Apache License 2.0 | 5 votes |
@Test public void generateSwaggerJson() throws Exception { Set<Class<?>> classes = new HashSet<>(endpointConfig.getClasses()); classes.add(RedbeamsApi.class); Swagger swagger = new Reader(SwaggerConfigLocator.getInstance().getConfig(SwaggerContextService.CONFIG_ID_DEFAULT).configure(new Swagger())) .read(classes); Path path = Paths.get("./build/swagger/redbeams.json"); Files.createDirectories(path.getParent()); Files.writeString(path, Json.pretty(swagger)); }
Example #22
Source File: SwaggerConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
@PostConstruct private void registerSwagger() { BeanConfig swaggerConfig = new BeanConfig(); swaggerConfig.setTitle("Redbeams API"); swaggerConfig.setDescription("API for working with databases and database servers"); swaggerConfig.setVersion(applicationVersion); swaggerConfig.setSchemes(new String[]{"http", "https"}); swaggerConfig.setBasePath(contextPath + RedbeamsApi.API_ROOT_CONTEXT); swaggerConfig.setLicenseUrl("https://github.com/sequenceiq/cloudbreak/blob/master/LICENSE"); swaggerConfig.setResourcePackage("com.sequenceiq.redbeams.api,com.sequenceiq.flow.api,com.sequenceiq.authorization"); swaggerConfig.setScan(true); swaggerConfig.setContact("https://hortonworks.com/contact-sales/"); swaggerConfig.setPrettyPrint(true); SwaggerConfigLocator.getInstance().putConfig(SwaggerContextService.CONFIG_ID_DEFAULT, swaggerConfig); }
Example #23
Source File: AgentSwaggerConfig.java From codenvy with Eclipse Public License 1.0 | 5 votes |
@Override public void init(ServletConfig config) throws ServletException { try { BeanConfig beanConfig = new BeanConfig(); beanConfig.setVersion("1.0"); beanConfig.setTitle("Codenvy"); beanConfig.setBasePath(new URL(agentEndpoint).getPath()); beanConfig.scanAndRead(); new SwaggerContextService().withSwaggerConfig(beanConfig).initConfig().initScanner(); } catch (MalformedURLException e) { LOG.warn("Unable to initialize swagger config due to malformed agent URL.", e); } }