'Springdoc endpoints doesn't show up

Hello I have built a project in Thymleaf and wanted to generate the API documentation with swagger. But for some reason I can't explain, only endpoints annotated with @Rquestboy are documented. Does anyone have any idea where this might be?

enter image description here

enter image description here

enter image description here



Solution 1:[1]

I have solved the problem by using a different dependency

Gradle:

// springfox
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'

// springfox-swagger-ui
implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '3.0.0'
implementation group: 'io.springfox', name: 'springfox-bean-validators', version: '3.0.0'

ConfigClass:

@Configuration
@Import(BeanValidatorPluginsConfiguration.class)
public class SwaggerConfig {

    @Bean
    public Docket api() {
        return new Docket(DocumentationType.SWAGGER_2)
                .select()
                .apis(RequestHandlerSelectors.basePackage("Class.Path.to.the.Controler"))
                .build();
    }
}

You have to change the class path to the path to your endpoints !!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sniphs