Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAPI Review Guidelines

English · 日本語 · 简体中文 · 繁體中文 · 한국어 · Español · Русский · Français · Deutsch · Português (BR)

Language- and tooling-agnostic principles for reviewing changes to OpenAPI definitions (API surface / schema design). The rules describe why a given naming, nullability, typing, structure, or modeling choice should be flagged in review — at an abstraction level that does not depend on any specific programming language, code generator, or YAML syntax.

These are principles, not absolute laws. Deviations are legitimate when justified by compatibility with persisted data or external APIs, or by an established business reason — but such deviations should be made explicit in the review.

Available languages

The full ruleset is maintained in parallel translations. The Japanese version (languages/openapi-review-guidelines.ja.md) is the source of truth; other languages are translations of it. Filenames use ISO 639-1 language codes with a script subtag (Hans/Hant) or region suffix (BR) where relevant.

Language File
日本語 (Japanese, source) openapi-review-guidelines.ja.md
English openapi-review-guidelines.en.md
中文(简体)/ Chinese (Simplified) openapi-review-guidelines.zh-Hans.md
中文(繁體)/ Chinese (Traditional) openapi-review-guidelines.zh-Hant.md
한국어 / Korean openapi-review-guidelines.ko.md
Español / Spanish openapi-review-guidelines.es.md
Русский / Russian openapi-review-guidelines.ru.md
Français / French openapi-review-guidelines.fr.md
Deutsch / German openapi-review-guidelines.de.md
Português (Brasil) / Portuguese (Brazil) openapi-review-guidelines.pt-BR.md

When editing the rules, change languages/openapi-review-guidelines.ja.md first, then propagate the change to every translation so the set stays in sync.

Topics covered

  • Naming — clarity over brevity, no ad-hoc abbreviations, no implementation/history leakage, name–value semantic match, correct English, boolean prefixes (is/has/can), plural arrays, concept-based schema names.
  • Nullability — separating optional (non-required) from nullable; grounding null in a real use case; documenting the meaning of null; distinguishing "zero" from "absent".
  • Types & formats — numeric/boolean types over strings, integer counters, consistent ID types, RFC 3339 date-time vs date, uri format, decimal precision.
  • Schema structure & reuse — extract repeated structures to components (SSOT), composition with allOf, one schema per contractual concept, oneOf/anyOf/discriminator, avoiding derivable fields.
  • Conceptual modeling & responsibility — single responsibility per schema, one classification axis per enum, domain vs UI-presentation separation, server-side authoritative computation, not leaking external code systems.
  • Consistency — uniform spelling/case/pluralization across tags, paths, schemas, enums, properties; matching description to implementation; consistent pagination.
  • Intuitive understandability — replacing magic numbers with enums, self-describing enum values, open vs closed enums for forward compatibility, self-contained descriptions, removing dead fields.
  • Security & auth — centralizing shared headers as reusable parameters, separating server-to-server webhooks, grounding external-API schemas in real behavior.
  • Spec health — single source of truth, validated specs, cross-file propagation of fixes.

Examples

Related literature

The ruleset has been cross-checked against the following authoritative and widely-referenced sources, with which it is broadly aligned:

Official / specification

Industry API design guidelines

Practitioner references

Topics worth consulting beyond this ruleset

Areas the literature emphasizes that this ruleset currently covers only lightly, and which are worth consulting in the sources above when relevant:

  • Standardized error format — RFC 9457 / RFC 7807 (Problem Details).
  • Response-side pagination shape (cursor pagination, standard paging objects with links).
  • Idempotency & optimistic locking (ETag / If-Match).
  • Standard value formats — ISO 4217 (currency), ISO 3166 (country), ISO 639 (language).
  • API versioning strategy specifics (URL path vs media type vs header).
  • additionalProperties / maps & dictionaries handling.

License

MIT © 2026 Kotaro Matsumoto

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors