Java Code Examples for springfox.documentation.spi.DocumentationTypeThe following are top voted examples for showing how to use springfox.documentation.spi.DocumentationType. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to product more good examples.
Example 1Project: Learny---Server File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket learnyApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).genericModelSubstitutes(ResponseEntity.class).useDefaultResponseMessages(false).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Example 2Project: jhipster_myapp File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket swaggerSpringMvcPlugin = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)) // and by paths.build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return swaggerSpringMvcPlugin;}
Example 3Project: jhipster-sample-app-gradle File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 4Project: menuber File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 5Project: jhipster-sample-app-java7 File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 6Project: bugkillers File: SpringfoxConfig2.java View source code 6 votes
@Beanpublic Docket swaggerSpringMvcPlugin() {// return new Docket(DocumentationType.SWAGGER_2);return new Docket(DocumentationType.SWAGGER_2)// .groupName("bugkillers").select()//Ignores controllers annotated with @CustomIgnore// .apis(not(withClassAnnotation(CustomIgnore.class)) //Selection by RequestHandler.paths(paths()) // and by paths.build().apiInfo(apiInfo()).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Example 7Project: springfox-demos File: Application.java View source code 6 votes
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).groupName("full-petstore-api").apiInfo(apiInfo()).select().paths(petstorePaths()).build();}
Example 8Project: flipper-reverse-image-search File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 9Project: jhipster-ionic File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 10Project: barweb File: ApiDocumentationConfig.java View source code 6 votes
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/api").directModelSubstitute(LocalDate.class, String.class).genericModelSubstitutes(ResponseEntity.class).alternateTypeRules(newRule(
typeResolver.resolve(DeferredResult.class,
typeResolver.resolve(ResponseEntity.class, WildcardType.class)),
typeResolver.resolve(WildcardType.class))).useDefaultResponseMessages(false).globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Example 11Project: jhipster-sample-app File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 12Project: availability File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket api() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).genericModelSubstitutes(ResponseEntity.class).alternateTypeRules(
newRule(typeResolver.resolve(DeferredResult.class,
typeResolver.resolve(ResponseEntity.class, WildcardType.class)),
typeResolver.resolve(WildcardType.class))).useDefaultResponseMessages(false).globalResponseMessage(RequestMethod.GET,
newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Example 13Project: jhipster-sample-app-mongodb File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 14Project: spring-swagger2markup-demo File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket restApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().paths(Predicates.and(ant("/**"), Predicates.not(ant("/error")))).build();}
Example 15Project: cqrs-axon File: Swagger2Configuration.java View source code 6 votes
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class, String.class).genericModelSubstitutes(ResponseEntity.class).alternateTypeRules(newRule(
typeResolver.resolve(DeferredResult.class,
typeResolver.resolve(ResponseEntity.class, WildcardType.class)),
typeResolver.resolve(WildcardType.class))).useDefaultResponseMessages(false).globalResponseMessage(RequestMethod.GET,
newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Example 16Project: fullstop File: SwaggerConfig.java View source code 6 votes
@Beanpublic Docket customImplementation() {return new Docket(DocumentationType.SWAGGER_2) //.apiInfo(apiInfo()) //.select() //.paths(fullstopOnlyEndpoints()) //.build();}
Example 17Project: jhipster-sample-app-elasticsearch File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();ApiInfo apiInfo = new ApiInfo(
jHipsterProperties.getSwagger().getTitle(),
jHipsterProperties.getSwagger().getDescription(),
jHipsterProperties.getSwagger().getVersion(),
jHipsterProperties.getSwagger().getTermsOfServiceUrl(),
jHipsterProperties.getSwagger().getContact(),
jHipsterProperties.getSwagger().getLicense(),
jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 18Project: JTL-FIleService File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Example 19Project: ABC-Go File: SwaggerConfiguration.java View source code 6 votes
/**
* Swagger Springfox configuration.
*/@Beanpublic Docket swaggerSpringfoxDocket() {
log.debug("Starting Swagger");StopWatch watch = new StopWatch();
watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
watch.stop();
log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
The following are top voted examples for showing how to use springfox.documentation.spi.DocumentationType. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to product more good examples.
Project: Learny---Server File: SwaggerConfig.java View source code | 6 votes |
@Beanpublic Docket learnyApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).genericModelSubstitutes(ResponseEntity.class).useDefaultResponseMessages(false).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Project: jhipster_myapp File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket() { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();Docket swaggerSpringMvcPlugin = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)) // and by paths.build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return swaggerSpringMvcPlugin;}
Project: jhipster-sample-app-gradle File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: menuber File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket() { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: jhipster-sample-app-java7 File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: bugkillers File: SpringfoxConfig2.java View source code | 6 votes |
@Beanpublic Docket swaggerSpringMvcPlugin() {// return new Docket(DocumentationType.SWAGGER_2);return new Docket(DocumentationType.SWAGGER_2)// .groupName("bugkillers").select()//Ignores controllers annotated with @CustomIgnore// .apis(not(withClassAnnotation(CustomIgnore.class)) //Selection by RequestHandler.paths(paths()) // and by paths.build().apiInfo(apiInfo()).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Project: springfox-demos File: Application.java View source code | 6 votes |
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).groupName("full-petstore-api").apiInfo(apiInfo()).select().paths(petstorePaths()).build();}
Project: flipper-reverse-image-search File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket() { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: jhipster-ionic File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket() { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: barweb File: ApiDocumentationConfig.java View source code | 6 votes |
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/api").directModelSubstitute(LocalDate.class, String.class).genericModelSubstitutes(ResponseEntity.class).alternateTypeRules(newRule( typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))).useDefaultResponseMessages(false).globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext()));}
Project: jhipster-sample-app File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: availability File: SwaggerConfig.java View source code | 6 votes |
@Beanpublic Docket api() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class,String.class).genericModelSubstitutes(ResponseEntity.class).alternateTypeRules( newRule(typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))).useDefaultResponseMessages(false).globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Project: jhipster-sample-app-mongodb File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: spring-swagger2markup-demo File: SwaggerConfig.java View source code | 6 votes |
@Beanpublic Docket restApi() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().paths(Predicates.and(ant("/**"), Predicates.not(ant("/error")))).build();}
Project: cqrs-axon File: Swagger2Configuration.java View source code | 6 votes |
@Beanpublic Docket petApi() {return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build().pathMapping("/").directModelSubstitute(LocalDate.class, String.class).genericModelSubstitutes(ResponseEntity.class).alternateTypeRules(newRule( typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))).useDefaultResponseMessages(false).globalResponseMessage(RequestMethod.GET, newArrayList(new ResponseMessageBuilder().code(500).message("500 message").responseModel(new ModelRef("Error")).build())).securitySchemes(newArrayList(apiKey())).securityContexts(newArrayList(securityContext())).enableUrlTemplating(true);}
Project: fullstop File: SwaggerConfig.java View source code | 6 votes |
@Beanpublic Docket customImplementation() {return new Docket(DocumentationType.SWAGGER_2) //.apiInfo(apiInfo()) //.select() //.paths(fullstopOnlyEndpoints()) //.build();}
Project: jhipster-sample-app-elasticsearch File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket(JHipsterProperties jHipsterProperties) { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();ApiInfo apiInfo = new ApiInfo( jHipsterProperties.getSwagger().getTitle(), jHipsterProperties.getSwagger().getDescription(), jHipsterProperties.getSwagger().getVersion(), jHipsterProperties.getSwagger().getTermsOfServiceUrl(), jHipsterProperties.getSwagger().getContact(), jHipsterProperties.getSwagger().getLicense(), jHipsterProperties.getSwagger().getLicenseUrl());Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: JTL-FIleService File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket() { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).directModelSubstitute(java.time.LocalDate.class, String.class).directModelSubstitute(java.time.ZonedDateTime.class, Date.class).directModelSubstitute(java.time.LocalDateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}
Project: ABC-Go File: SwaggerConfiguration.java View source code | 6 votes |
/** * Swagger Springfox configuration. */@Beanpublic Docket swaggerSpringfoxDocket() { log.debug("Starting Swagger");StopWatch watch = new StopWatch(); watch.start();Docket docket = new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).genericModelSubstitutes(ResponseEntity.class).forCodeGeneration(true).genericModelSubstitutes(ResponseEntity.class).directModelSubstitute(org.joda.time.LocalDate.class, String.class).directModelSubstitute(org.joda.time.LocalDateTime.class, Date.class).directModelSubstitute(org.joda.time.DateTime.class, Date.class).select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build(); watch.stop(); log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());return docket;}