Bird
0
0

In a Spring Boot application with default SpringDoc OpenAPI configuration, which URL will serve the OpenAPI JSON documentation?

medium📝 component behavior Q4 of 15
Spring Boot - API Documentation
In a Spring Boot application with default SpringDoc OpenAPI configuration, which URL will serve the OpenAPI JSON documentation?
A/v3/api-docs
B/swagger-ui.html
C/api-docs.json
D/openapi.json
Step-by-Step Solution
Solution:
  1. Step 1: Understand Default Paths

    SpringDoc OpenAPI by default exposes the OpenAPI JSON at /v3/api-docs.
  2. Step 2: Differentiate Swagger UI URL

    The Swagger UI is typically served at /swagger-ui.html, not the raw JSON.
  3. Final Answer:

    /v3/api-docs -> Option A
  4. Quick Check:

    Default OpenAPI JSON path is /v3/api-docs [OK]
Quick Trick: OpenAPI JSON is at /v3/api-docs by default [OK]
Common Mistakes:
  • Confusing Swagger UI URL with OpenAPI JSON URL
  • Assuming custom paths without configuration
  • Using deprecated or incorrect endpoints

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes