Recall & Review
beginner
What is SpringDoc OpenAPI used for in a Spring Boot project?
SpringDoc OpenAPI automatically generates API documentation for your Spring Boot REST APIs, making it easy to visualize and test endpoints.
Click to reveal answer
beginner
Which dependency do you add to a Spring Boot project to enable SpringDoc OpenAPI?
Add
org.springdoc:springdoc-openapi-starter-webmvc-ui to your pom.xml or build.gradle to enable SpringDoc OpenAPI with Swagger UI.Click to reveal answer
beginner
How do you access the Swagger UI after setting up SpringDoc OpenAPI in your Spring Boot app?
Open your browser and go to
http://localhost:8080/swagger-ui.html or http://localhost:8080/swagger-ui/index.html to see the interactive API docs.Click to reveal answer
intermediate
What is the purpose of the
@OpenAPIDefinition annotation in SpringDoc?It lets you customize the OpenAPI metadata like title, version, description, and contact info for your API documentation.
Click to reveal answer
intermediate
How can you exclude certain endpoints from appearing in the SpringDoc OpenAPI documentation?
Use the
@Hidden annotation on controllers or methods you want to hide from the generated API docs.Click to reveal answer
Which dependency is recommended for adding SpringDoc OpenAPI UI support in a Spring Boot project?
✗ Incorrect
The correct dependency is
org.springdoc:springdoc-openapi-starter-webmvc-ui which includes SpringDoc and Swagger UI integration.After setting up SpringDoc, where can you view the generated API documentation?
✗ Incorrect
The Swagger UI is accessible by default at
/swagger-ui.html or /swagger-ui/index.html.Which annotation allows you to customize the API title and version in SpringDoc?
✗ Incorrect
The
@OpenAPIDefinition annotation is used to set metadata like title and version.How do you hide a REST controller method from SpringDoc generated docs?
✗ Incorrect
The
@Hidden annotation hides controllers or methods from the OpenAPI documentation.What is the main benefit of using SpringDoc OpenAPI in your Spring Boot project?
✗ Incorrect
SpringDoc OpenAPI automatically generates and updates API docs based on your code.
Explain how to set up SpringDoc OpenAPI in a new Spring Boot project and how to access the API documentation.
Think about dependencies, running the app, and the URL to view docs.
You got /3 concepts.
Describe how to customize the API metadata and hide specific endpoints in SpringDoc OpenAPI.
Focus on annotations for customization and exclusion.
You got /2 concepts.