Skip to content

SwaggerUI embed.FS not rendering when hit the endpoint #34

Answered by MarioCarrion
dibrito asked this question in Q&A
Discussion options

You must be logged in to vote

@dibrito Apologies for the late reply it looks like I either missed the notification or I never got it.

If you're a getting a 404 when hitting the http://localhost:8080/openapi3.json endpoint then it means it wasn't added to the router. The code doing that is here, which registers the endpoints with something like:

	r.HandleFunc("/openapi3.json", func(w http.ResponseWriter, r *http.Request) {
		renderResponse(w, &swagger, http.StatusOK)
	}).Methods(http.MethodGet)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MarioCarrion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants