Showing results for 
Search instead for 
Did you mean: 

Swagger yaml and annotation combination - Java

New Contributor

Swagger yaml and annotation combination - Java

I would like to have a combination of yaml and annotation based swagger ui. I want my code to have flexibility to add controllers with annotations and yaml both. I am able to get it running for yaml and annotation separately.As for some UIs I would like to skip the overhead of writing a lot of annotations with examples. I don't want the developers to miss out the entry that's why the annotation functionality is needed. Is there any approach that works for the hybrid ? Here is what I tried :


    public SwaggerResourcesProvider swaggerResourcesProvider(InMemorySwaggerResourcesProvider defaultResourcesProvider) {
        return () -> {
            SwaggerResource wsResource = new SwaggerResource();

            List<SwaggerResource> resources = new ArrayList<>(defaultResourcesProvider.get());
            return resources;


New Here?
Join us and watch the welcome video:
Top Kudoed Authors