I have quite an old application. Spring 5(non-boot). I wanted to have a swagger to understand contract between FE and BE.
I think I've read all topics at SO why Swagger-ui could be unavailable but it still doesn't fully working. But I was able to make /api-docs
endpoint working altough I want to make working /swagger-ui/index.htm
. I have no idea how to configure it so I want to know how to read such a hige json which is a respinse of /api-docs
. Looks like it already contains all contracts.
I tried to find online services like https://api-docs.io/ but it can't read the result for some reasons. Are there any other tools to read that response ?
Asked
Active
Viewed 135 times
1

gstackoverflow
- 36,709
- 117
- 359
- 710
-
1There are 2 parts to an OpenAPI/Swagger - you need the specification document, that's `/api-docs` and is generated by `springfox-swagger2`. The 2nd part is a UI that can display that document. That's usually `springfox-swagger-ui` if you include it on the server itself, alternatively if your docs at `/api-docs` are public you can simply put the url in the top of https://petstore.swagger.io/ and look at them there. https://www.baeldung.com/swagger-2-documentation-for-spring-rest-api has some config hints for non boot apps but your question doesn't contain any clues why it may not work for you – zapl Nov 07 '22 at 20:29
-
@zapl thank you for your comment. SO is full of different questions/asnswers about reason why swagger doesn't work. I tried at least 1. https://stackoverflow.com/a/26722686/2674303 2. https://stackoverflow.com/a/33258645/2674303 3. https://github.com/springfox/springfox/issues/776 4. https://stackoverflow.com/a/43545893/2674303 ... But I had almost no luck for some reasons – gstackoverflow Nov 08 '22 at 08:02
1 Answers
0
If swagger generated OpenAPI document in YAML or JSON formats then you can copy and paste them here for a nice UI: https://editor.swagger.io

Oleksandr
- 3,574
- 8
- 41
- 78
-
Yes, it renders something but also it complains for a long list of errors: [link](http://dl4.joxi.net/drive/2022/11/08/0005/3037/338909/09/cd470d6676.jpg) – gstackoverflow Nov 08 '22 at 07:47