Sometimes, when running swagger, it will cause“ Internal Server Error /swagger/v1/swagger.json ” Wrong.
Here are my solutions:
1. First look at the console and check the reason. The reason is: ambiguous HTTP method for action, which is translated as “ambiguous HTTP operation method”. It is estimated that a brother did not indicate the HTTP method when submitting the code.
2. Search all public methods in the controller. In the search result window, press ↓ on the keyboard and ↑ Button to quickly switch to search. Finally, it is found that the method is written in public and changed to private.
Conclusion:
Ambiguous HTTP method for action, translated as “ambiguous HTTP operation method”.
There may be no HTTP method written, such as [httpget], [httppost], add to the method.
It may also be caused by writing some methods that should have been private to public.