Does Swagger UI overshadow the login endpoint?

116 Views Asked by At

I'm using OpenAPI 3.0 (or Swagger UI) to document and also test the REST endpoints of my Spring Boot project. After integrating Spring Security with JWT-based authentication and authorization, I can call all non-authenticated endpoints from Swagger UI except for login/. Since I can call login/ with curl

curl -X 'POST' \
  'http://localhost:8080/api/v1.0/auth/login' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "mail": "[email protected]",
  "password": "string"
}' 

I suppose Swagger does somehow overshadow the login endpoind and Swagger UI gets stuck when I call login (see below).

Endpoint for logging in is called from Swagger UI. Request is loading indefinitely.

What is the problem here? Should I just rename the login endpoint? I need to login to get the JWT token in order to continue working on and testing my service.

0

There are 0 best solutions below