Bird
0
0

You have this method parameter:

medium📝 Debug Q6 of 15
Spring Boot - API Documentation
You have this method parameter:
@Parameter(description = "User ID", required = true) String userId

But the generated API docs do not show the description. What is a likely cause?
AThe @Parameter annotation is missing the <code>@Operation</code> annotation on the method
BThe project lacks the OpenAPI dependency to process @Parameter annotations
CThe parameter type must be primitive for @Parameter to work
DThe description attribute is misspelled
Step-by-Step Solution
Solution:
  1. Step 1: Check project setup for OpenAPI support

    @Parameter annotations require OpenAPI or Swagger dependencies to generate documentation properly.
  2. Step 2: Verify other options

    @Operation is not mandatory for @Parameter to work. Parameter type can be String. Description attribute is correct.
  3. Final Answer:

    The project lacks the OpenAPI dependency to process @Parameter annotations -> Option B
  4. Quick Check:

    Missing OpenAPI dependency = No @Parameter docs [OK]
Quick Trick: Add OpenAPI dependency to enable @Parameter docs [OK]
Common Mistakes:
  • Assuming @Operation is required for @Parameter
  • Thinking primitive types only work
  • Misspelling description attribute

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes