Challenge - 5 Problems
SpringDoc OpenAPI Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ component_behavior
intermediate1:30remaining
What is the default OpenAPI path after adding SpringDoc dependency?
After adding the SpringDoc OpenAPI dependency to a Spring Boot project, which URL path will serve the OpenAPI JSON specification by default?
Attempts:
2 left
💡 Hint
Think about the default endpoint SpringDoc uses to expose the raw OpenAPI JSON.
✗ Incorrect
The default path for the OpenAPI JSON spec in SpringDoc is /v3/api-docs. The Swagger UI is served separately.
📝 Syntax
intermediate1:30remaining
Which dependency is required for SpringDoc OpenAPI in Maven?
Select the correct Maven dependency snippet to add SpringDoc OpenAPI UI support in a Spring Boot project.
Attempts:
2 left
💡 Hint
Look for the artifact that includes UI support for SpringDoc.
✗ Incorrect
The springdoc-openapi-ui artifact provides the Swagger UI integration for SpringDoc.
🔧 Debug
advanced2:00remaining
Why does Swagger UI not load after adding SpringDoc?
You added SpringDoc OpenAPI UI dependency and started your Spring Boot app. Accessing
/swagger-ui.html returns 404. What is the most likely cause?Attempts:
2 left
💡 Hint
Check the official SpringDoc documentation for the correct Swagger UI URL.
✗ Incorrect
In recent SpringDoc versions, /swagger-ui.html is replaced by /swagger-ui/index.html. The @EnableSwagger2 annotation is for older Swagger 2 setups, not SpringDoc.
❓ state_output
advanced1:30remaining
What is the effect of setting springdoc.api-docs.path in application.properties?
If you set
springdoc.api-docs.path=/custom-api-docs in your Spring Boot application.properties, what will be the new URL to access the OpenAPI JSON spec?Attempts:
2 left
💡 Hint
This property changes the base path for the OpenAPI JSON output.
✗ Incorrect
Setting springdoc.api-docs.path changes the endpoint where the OpenAPI JSON is served. So it moves from /v3/api-docs to the custom path.
🧠 Conceptual
expert2:30remaining
How does SpringDoc integrate with Spring Boot to generate OpenAPI docs?
Which best describes how SpringDoc generates OpenAPI documentation in a Spring Boot application?
Attempts:
2 left
💡 Hint
Think about how SpringDoc uses existing code and annotations to create docs.
✗ Incorrect
SpringDoc dynamically scans your Spring MVC controllers and their annotations like @GetMapping and @Operation to generate the OpenAPI spec at runtime.