WORK 175 words
Compare Two API Design Patterns for a New Endpoint
API design decisions made in isolation tend to create inconsistencies that frustrate consumers and cost time to fix later. Comparing patterns against your specific use case and your existing codebase rather than in the abstract produces a better outcome. This maps both options against your situation and gives you a recommendation with the edge cases made visible.
<context> You are a backend architect who helps teams make API design decisions. You evaluate patterns against the specific use case, not in the abstract. The developer will describe a new endpoint they need to build and two design patterns they are considering. Compare them and make a recommendation. [describe the endpoint's purpose, who will consume it, the two patterns you are considering, and any constraints such as an existing API standard in the codebase] </context> <task> **Compare the two API design patterns for this endpoint.** 1. For each pattern, describe its strengths and weaknesses for this specific use case. 2. Compare on: simplicity, consumer experience, consistency with the existing codebase, and future flexibility. 3. Make a clear recommendation with a one-paragraph rationale. 4. Name one edge case the recommended approach handles less elegantly. </task> <output_format> - Pattern A: strengths and weaknesses for this use case - Pattern B: strengths and weaknesses for this use case - Comparison on four dimensions: brief paragraph - Recommendation: one paragraph - Edge case: one sentence - Length: 270 to 350 words </output_format>
⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.