Skip to content
Advertisement

POST/PUT/DELETE doesn’t shown in swagger springboot

it’s my swagger Config file

JavaScript

Student Controller

JavaScript

StudentDTO class

JavaScript

My Repository

JavaScript

Myapplication class

JavaScript

application.properties

JavaScript

pom.xml

JavaScript

When I run this application everything looks fine but I can’t see the POST/PUT/or DELETE. I try to many things I find from Internet but it doesn’t work. I new on this topic. I actually want to wrote null inputs and get exceptions for exception handling.

Advertisement

Answer

So your Docket Configuration has specified a regex pattern for product

JavaScript

But your controllers don’t have any APIs with /product. Thus you’re not able to see APIs in swagger documentation.

Try with below configuration and see if it shows you all endpoints and then start working around regex configurations.

JavaScript

Above configuration matches all the API paths in your web application basically anywhere.

You can access your APIs at Change the APPLICATION_PORT and CONTEXT-PATH

http://localhost:{{APPLICATION_PORT}}/{{CONTEXT-PATH}}/swagger-ui.html

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement