.openApiConfiguration(config); if (StringUtils.isNotBlank(contextId)) { builder.ctxId(contextId); .buildContext(true) .read(); String openapiJson = null;
.application(app) .resourcePackages(resourcePackages) .configLocation(configLocation) .openApiConfiguration(openApiConfiguration) .ctxId(ctxId) .buildContext(true); OpenAPI oas = ctx.read(); boolean pretty = false;
public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException { if (classes != null && classes.size() != 0) { Set<Class<?>> resources = new LinkedHashSet(); classes.stream() .filter(c -> ignored.stream().noneMatch(i -> c.getName().startsWith(i))) .forEach(resources::add); if (!resources.isEmpty()) { // init context try { SwaggerConfiguration oasConfig = new SwaggerConfiguration() .resourceClasses(resources.stream().map(c -> c.getName()).collect(Collectors.toSet())); new JaxrsOpenApiContextBuilder() .openApiConfiguration(oasConfig) .buildContext(true); } catch (OpenApiConfigurationException e) { throw new RuntimeException(e.getMessage(), e); } } } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); String ctxId = getContextIdFromServletConfig(config); try { new ServletOpenApiContextBuilder() .servletConfig(config) .ctxId(ctxId) .buildContext(true); } catch (OpenApiConfigurationException e) { e.printStackTrace(); } }
.openApiConfiguration(config); if (StringUtils.isNotBlank(contextId)) { builder.ctxId(contextId); .buildContext(true) .read(); String openapiJson = null;
.application(app) .resourcePackages(resourcePackages) .configLocation(configLocation) .openApiConfiguration(openApiConfiguration) .ctxId(ctxId) .buildContext(true); OpenAPI oas = ctx.read(); boolean pretty = false;
@Override public void init(ServletConfig config) throws ServletException { super.init(config); String ctxId = getContextIdFromServletConfig(config); try { new ServletOpenApiContextBuilder() .servletConfig(config) .ctxId(ctxId) .buildContext(true); } catch (OpenApiConfigurationException e) { e.printStackTrace(); } }
.openApiConfiguration(config); if (StringUtils.isNotBlank(contextId)) { builder.ctxId(contextId); .buildContext(true) .read(); String openapiJson = null;
.application(getApplication()) .openApiConfiguration(oasConfig) .buildContext(true); } catch (OpenApiConfigurationException e) { throw new InternalServerErrorException(e);
.application(application) .openApiConfiguration(config) .ctxId(ctxId); /* will be null if not used */ } else { openApiConfiguration = new JaxrsOpenApiContextBuilder<>() .application(application) .configLocation(defaultConfigLocation) .ctxId(ctxId); /* will be null if not used */ final OpenApiContext context = openApiConfiguration.buildContext(true); final Properties userProperties = getUserProperties( context
.application(application) .openApiConfiguration(config) .ctxId(ctxId); /* will be null if not used */ } else { openApiConfiguration = new JaxrsOpenApiContextBuilder<>() .application(application) .configLocation(defaultConfigLocation) .ctxId(ctxId); /* will be null if not used */ final OpenApiContext context = openApiConfiguration.buildContext(true); final Properties userProperties = getUserProperties( context