protected Properties getSwaggerProperties(Bus bus) { InputStream is = ResourceUtils.getClasspathResourceStream(propertiesLocation, AbstractSwaggerFeature.class, bus); Properties props = null; if (is != null) { props = new Properties(); try { props.load(is); } catch (IOException ex) { props = null; } finally { try { is.close(); } catch (IOException ignore) { // ignore } } } return props; } protected void initBeanConfig(BeanConfig beanConfig, Properties props) {
/** * Read the Swagger-specific properties from the property file (to seamlessly * support the migration from older Swagger features). * @param location property file location * @param bus bus instance * @return the properties if available */ default Properties getSwaggerProperties(String location, Bus bus) { InputStream is = ResourceUtils.getClasspathResourceStream(location, SwaggerProperties.class, bus); Properties props = null; if (is != null) { props = new Properties(); try { props.load(is); } catch (IOException ex) { props = null; } finally { try { is.close(); } catch (IOException ignore) { // ignore } } } return props; } }
/** * Read the Swagger-specific properties from the property file (to seamlessly * support the migration from older Swagger features). * @param location property file location * @param bus bus instance * @return the properties if available */ default Properties getSwaggerProperties(String location, Bus bus) { InputStream is = ResourceUtils.getClasspathResourceStream(location, SwaggerProperties.class, bus); Properties props = null; if (is != null) { props = new Properties(); try { props.load(is); } catch (IOException ex) { props = null; } finally { try { is.close(); } catch (IOException ignore) { // ignore } } } return props; } }
if (d.docuri().startsWith(CLASSPATH_PREFIX)) { String path = d.docuri().substring(CLASSPATH_PREFIX.length()); is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class, bus == null ? BusFactory.getDefaultBus() : bus); if (is != null) {
if (d.docuri().startsWith(CLASSPATH_PREFIX)) { String path = d.docuri().substring(CLASSPATH_PREFIX.length()); is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class, bus == null ? BusFactory.getDefaultBus() : bus); if (is != null) {
if (d.docuri().startsWith(CLASSPATH_PREFIX)) { String path = d.docuri().substring(CLASSPATH_PREFIX.length()); is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class, bus == null ? BusFactory.getDefaultBus() : bus); if (is != null) {
if (d.docuri().startsWith(CLASSPATH_PREFIX)) { final String path = d.docuri().substring(CLASSPATH_PREFIX.length()); is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class, BusFactory.getDefaultBus()); if (is != null) {