Bird
0
0

You want to customize the generated Spring client code to use a specific package name. Which option should you add to the openapi-generator-cli command?

hard📝 Application Q8 of 15
Spring Boot - API Documentation
You want to customize the generated Spring client code to use a specific package name. Which option should you add to the openapi-generator-cli command?
A--additional-properties=packageName=com.example.client
B-p packageName=com.example.client
C--package-name com.example.client
D-DpackageName=com.example.client
Step-by-Step Solution
Solution:
  1. Step 1: Identify how to pass custom properties

    openapi-generator-cli uses the '--additional-properties' flag to set custom options like package name.
  2. Step 2: Confirm correct syntax

    The correct syntax is '--additional-properties=packageName=com.example.client'. Other options are invalid or unsupported.
  3. Final Answer:

    --additional-properties=packageName=com.example.client -> Option A
  4. Quick Check:

    Use --additional-properties to customize package name [OK]
Quick Trick: Customize with --additional-properties flag [OK]
Common Mistakes:
  • Using incorrect flags like -p or -D
  • Trying --package-name which is unsupported
  • Not passing packageName as additional property

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes