{
  "id": 5099421,
  "title": "Why Is the Swagger Petstore Example a Bad REST API Design?",
  "url": "https://urgent.news/2026/09/02/why-is-the-swagger-petstore-example-a-bad-rest-api-design",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-02T14:02:15.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/preecha/why-is-the-swagger-petstore-example-a-bad-rest-api-design-dei"
  },
  "original_language": "en",
  "account": "Why Is the Swagger Petstore Example a Poor REST API Design?\n\nThe Swagger Petstore example, once a popular tool for teaching OpenAPI, presents several REST design flaws. Mixing singular and plural resource names, using action verbs in URLs, returning incorrect HTTP status codes, exposing passwords in GET requests, and returning non-standard error formats contribute to its poor design. These issues are common in many APIs due to the petstore's widespread use. Modern PetstoreAPI addresses these problems by adopting consistent resource naming, using query parameters for filters, and following proper HTTP status codes and error formats.",
  "summary": "TL;DR The Swagger Petstore is useful for demonstrating OpenAPI, but it is a poor REST design reference. It mixes singular and plural resource names, puts action verbs in URLs, uses incorrect HTTP status codes, exposes passwords in GET requests, returns bare arrays, and uses non-standard errors. Modern PetstoreAPI addresses these issues with consistent resource-oriented URLs, RFC 9457 error…",
  "key_points": [
    "Swagger Petstore mixes singular and plural resource names",
    "Uses action verbs in URLs for endpoints",
    "Returns incorrect HTTP status codes and non-standard errors"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}