Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Spring + SpringDoc + VAVR + Future + OpenAPI
package com.dominikdorn.sample.configuration;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.vavr.concurrent.Future;
import org.springdoc.core.GroupedOpenApi;
import org.springdoc.core.converters.ConverterUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class OpenAPIConfiguration {
static {
ConverterUtils.addResponseWrapperToIgnore(Future.class);
}
@Bean
public GroupedOpenApi publicOpenAPI( ) {
return GroupedOpenApi
.builder()
.setGroup("web")
.packagesToScan("com.dominikdorn.sample.web")
.build();
}
@Bean
public GroupedOpenApi v3OpenAPI() {
return GroupedOpenApi
.builder()
.setGroup("v3")
.packagesToScan("com.dominikdorn.sample.v3.web")
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.