Java Code Examples for springfox.documentation.service.ApiInfo#DEFAULT_CONTACT

The following examples show how to use springfox.documentation.service.ApiInfo#DEFAULT_CONTACT . 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: SwaggerAutoConfiguration.java    From albedo with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Springfox configuration for the management endpoints (actuator) Swagger docs.
 *
 * @param appName               the application name
 * @param managementContextPath the path to access management endpoints
 * @return the Swagger Springfox configuration
 */
@Bean
@ConditionalOnClass(name = "org.springframework.boot.actuate.autoconfigure.ManagementServerProperties")
@ConditionalOnProperty("management.endpoints.web.base-path")
@ConditionalOnExpression("'${management.endpoints.web.base-path}'.length() > 0")
@ConditionalOnMissingBean(name = "swaggerSpringfoxManagementDocket")
public Docket swaggerSpringfoxManagementDocket(@Value("${spring.application.name:application}") String appName,
											   @Value("${management.endpoints.web.base-path}") String managementContextPath) {

	ApiInfo apiInfo = new ApiInfo(
		StringUtils.capitalize(appName) + " " + MANAGEMENT_TITLE_SUFFIX,
		MANAGEMENT_DESCRIPTION,
		applicationSwaggerProperties.getVersion(),
		"",
		ApiInfo.DEFAULT_CONTACT,
		"",
		"",
		new ArrayList<>()
	);

	return createDocket()
		.apiInfo(apiInfo)
		.useDefaultResponseMessages(applicationSwaggerProperties.isUseDefaultResponseMessages())
		.groupName(MANAGEMENT_GROUP_NAME)
		.host(applicationSwaggerProperties.getHost())
		.protocols(new HashSet<>(Arrays.asList(applicationSwaggerProperties.getProtocols())))
		.forCodeGeneration(true)
		.directModelSubstitute(ByteBuffer.class, String.class)
		.genericModelSubstitutes(ResponseEntity.class)
		.select()
		.paths(regex(managementContextPath + ".*"))
		.build();
}
 
Example 2
Source File: SwaggerAutoConfiguration.java    From jhipster with Apache License 2.0 5 votes vote down vote up
/**
 * Springfox configuration for the management endpoints (actuator) Swagger docs.
 *
 * @param appName               the application name
 * @param managementContextPath the path to access management endpoints
 * @return the Swagger Springfox configuration
 */
@Bean
@ConditionalOnClass(name = "org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties")
@ConditionalOnProperty("management.endpoints.web.base-path")
@ConditionalOnExpression("'${management.endpoints.web.base-path}'.length() > 0")
@ConditionalOnMissingBean(name = "swaggerSpringfoxManagementDocket")
public Docket swaggerSpringfoxManagementDocket(@Value("${spring.application.name:application}") String appName,
                                               @Value("${management.endpoints.web.base-path}") String managementContextPath) {

    ApiInfo apiInfo = new ApiInfo(
        StringUtils.capitalize(appName) + " " + MANAGEMENT_TITLE_SUFFIX,
        MANAGEMENT_DESCRIPTION,
        properties.getVersion(),
        "",
        ApiInfo.DEFAULT_CONTACT,
        "",
        "",
        new ArrayList<>()
    );

    return createDocket()
        .apiInfo(apiInfo)
        .useDefaultResponseMessages(properties.isUseDefaultResponseMessages())
        .groupName(MANAGEMENT_GROUP_NAME)
        .host(properties.getHost())
        .protocols(new HashSet<>(Arrays.asList(properties.getProtocols())))
        .forCodeGeneration(true)
        .directModelSubstitute(ByteBuffer.class, String.class)
        .genericModelSubstitutes(ResponseEntity.class)
        .ignoredParameterTypes(Pageable.class)
        .select()
        .paths(regex(managementContextPath + ".*"))
        .build();
}
 
Example 3
Source File: SwaggerConfig.java    From fullstop with Apache License 2.0 5 votes vote down vote up
@Bean
ApiInfo apiInfo() {
    return new ApiInfo(
            "Fullstop API",
            "Audit reporting",
            "",
            "",
            ApiInfo.DEFAULT_CONTACT,
            "Apache 2.0",
            "http://www.apache.org/licenses/LICENSE-2.0.html",
            emptyList());
}