-
-
Notifications
You must be signed in to change notification settings - Fork 544
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Unable to expose external API from a spring boot project using swagger-config.json with below content
To Reproduce
Create 2 Spring Boot 2.3 web projects with springdoc-openapi-ui(1.3.9)
- Project 1 - create REST APIs. API docs available at http://localhost:8080/v3/api-docs
- Project 2 - access the openapi docs from Project 1 using swagger-config.json with below content
located in resources folder
{
"urls": [
{
"url": "http://localhost:8080/v3/api-docs",
"name": "members"
}
]
}
application.properties for project 2
springdoc.swagger-ui.configUrl=swagger-config.json
server.port=8093
springdoc.cache.disabled= true
Security is not configured for the project
When we access http://localhost:8093/swagger-ui.html
we get error on page "Failed to load remote configuration"
Error snippet below
GET "/swagger-config.json", parameters={}, headers={masked} in DispatcherServlet 'dispatcherServlet'
[nio-8093-exec-3] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to HandlerExecutionChain with [ResourceHttpRequestHandler ["classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/", "/"]] and 3 interceptors
[nio-8093-exec-3] o.s.w.s.r.ResourceHttpRequestHandler : Resource not found
[nio-8093-exec-3] o.s.web.servlet.DispatcherServlet : No view rendering, null ModelAndView returned.
[nio-8093-exec-3] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND, headers={masked}
Expected behavior
Should be able t view API documentation of project 1 in project 2 when we access http://localhost:8093/swagger-ui.html
Screenshots
getting below error when we access
arslanakhtar61
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested