Custom OpenAPI yml file is not found

45 views Asked by At

To play around with Spring Boot Reactive and functional programming, I've made a working example application. I've added the OpenApi library and made my own custom yaml file for API definition in order to test the application APIs, however when I try to access the swagger url, I receive an error stating that my custom yaml file is not available. Details are provided below:

application.properties:

spring.application.name=reactive-poc

spring.main.web-application-type=reactive

springdoc.swagger-ui.url=/reactive_poc_v1.yml

springdoc.swagger-ui.path=/swagger-ui.html

springdoc.api-docs.path=/v3/api-docs

springdoc.api-docs.groups.enabled=true

springdoc.swagger-ui.enabled=true

Pom.xml:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.1.5</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
...
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webflux-ui</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
            <version>2.3.0</version>
        </dependency>

Below given the error: enter image description here

enter image description here

Note: The Path for the reactive_poc_v1.yml file src\main\resources\static.

0

There are 0 answers