Swagger UI is a web interface for exploring and testing an API described with OpenAPI. It lists endpoints, schemas, and possible responses, then lets you send requests and inspect the results. For local testing, it can replace a heavier tool such as Postman. section 11.2
Add Swagger UI to an ASP.NET Core application with Swashbuckle:
- Open /swagger while the application is running. section 11.2
- Choose an endpoint, select Try it out, enter parameter values, and select Execute. section 11.2
Testing a documented endpoint
A GET endpoint may be documented as returning 200. Running it through Swagger UI can reveal an actual 404 response, showing why endpoint metadata should describe every possible result. section 11.2
Swagger UI derives its interface from the OpenAPI document, so accurate endpoint metadata determines the quality of the displayed schemas and responses. Authentication can also be tested by declaring a security scheme and protected endpoints in that document. section 11.2 section 25.5
Bearer authentication
Configure bearer authentication in the OpenAPI document, generate a token with user-jwts, and enter Bearer <token> in Swagger UI. The UI attaches the token to subsequent requests. section 25.5
Swagger UI works best for straightforward OpenAPI-described APIs and local testing. HATEOAS-driven APIs, combined gateway documents, advanced authentication extensions, and newer specification features may exceed its support or require workarounds. section 11.6.1 section 11.6.3


