SpringBoot integrates swagger2. Using a custom status code is not valid.

version statement:
springBoot: 1.5.9
swagger: 2.8.0
jdk: 1.8

 @ApiResponse(code = 10001 ,message = "")

status code 10001 this is invalid ~ what should I do so that swagger can identify its own defined status code?

Mar.16,2021

swagger 2 can only use httpstaus-related code, such as 500200. To identify custom status codes, use swagger 1

  • The problem of swagger2 sorting

    The springboot project uses swagger2 to automatically generate documents, but after generation, it is found that the order of the interfaces in the document is not in the order in the code. how do I use the order in the code, or can I customize the sort...

    Jan.26,2022
Menu