How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Deprecations, Defaults, and Details: The Subtle Tweaks You Might Miss in OpenAPI 3.2

calendar_today October 28, 2025 person Zaid Daba'een domain developerhub

Deprecations, Defaults, and Details: The Subtle Tweaks You Might Miss in OpenAPI 3.2<p>OpenAPI 3.2 comes with some big, headline features: streaming responses, structured tags, and even a new QUERY method.</p><p>But beneath those, there’s a quieter layer of refinements that make life easier for spec authors, tool builders, and documentation teams alike.</p><p>These are not the kind of updates that make release notes, but they are the ones that make your API definitions cleaner, stricter, and more predictable.</p><h3 id="1-smarter-deprecated-handling">1. Smarter deprecated handling</h3><p>Until now, marking something as deprecated: true was purely informational.</p><p>It signalled intent, but OpenAPI itself did not give much guidance on what could or should be deprecated.</p><p>OpenAPI 3.2 tightens that.</p><p>You can now mark schemas, parameters, headers, and even examples as deprecated, not just endpoints or operations.</p><p>This allows for more granular control in large APIs.</p><p>A single field in a model can be deprecated without confusing users or breaking the schema entirely.</p><p>For tool builders, it also means automated documentation can now visually highlight deprecated properties everywhere, not just in endpoint summaries.</p><h3 id="2-explicit-defaults-are-now-encouraged">2. Explicit defaults are now encouraged
</h3><p>Default values have always existed in OpenAPI, but they were loosely defined.</p><p>Different tools interpreted them differently, some treated them as examples, others as enforced fallbacks.</p><p>In 3.2, defaults are explicitly clarified to be informational hints to consumers, not behavioural guarantees.</p><p>This subtle change aligns OpenAPI with how most servers and SDKs actually behave:</p><p>Defaults are what clients may assume, not what servers must enforce.</p><p>Tools can now safely display default values without implying server logic.</p><p>For documentation and SDK generation, that means fewer misleading assumptions and a clearer contract between client and server.</p><h3 id="3-example-and-example-set-improvements">3. Example and example set improvements</h3><p>
OpenAPI 3.2 refines how examples can be defined and reused.</p><p>Examples are now allowed in more places, including within headers, parameters, and links.</p><p>This makes it easier to produce richer, context-aware documentation that shows realistic usage patterns.</p><p>You can also define multiple named examples more consistently across objects, enabling tools to display example tabs without relying on vendor extensions.</p><p>In short: less x-examples clutter and more consistency across your spec.</p><h3 id="4-cleaner-schema-references">4. Cleaner schema references</h3><p>3.2 also revisits how $ref behaves inside schema objects.</p><p>Previously, if you referenced a schema and added extra keywords next to it (like description, default, or nullable), tools disagreed on whether those extras should merge or override.</p><p>Now, the spec explicitly clarifies that adjacent keywords to $ref must be ignored. They do not merge.</p><p>This prevents subtle validation inconsistencies between generators, validators, and documentation tools.</p><p>If you want to extend a referenced schema, you now do so explicitly using allOf, as intended.</p><h3 id="5-polished-content-type-rules">5. Polished content type rules</h3><p>The new version also clarifies the relationship between content and schema definitions in request and response bodies.</p><p>In 3.0 and 3.1, it was easy to misconfigure a response with both, which led to unexpected validation results.</p><p>Now, OpenAPI 3.2 enforces a single source of truth: each media type defines its own schema.</p><p>This change improves clarity and helps API editors and linters catch misconfigurations early.</p><h3 id="the-small-things-add-up">The small things add up</h3><p>None of these updates will make headlines.</p><p>But together, they make OpenAPI 3.2 a more precise, predictable, and developer-friendly specification.</p><p>They also highlight the standard’s broader philosophy: evolve carefully, standardise what already works in the community, and make complex APIs just a bit simpler to describe.</p><p>So while the new features get the spotlight, it’s these quiet clarifications that will save developers hours in the long run.</p>

open_in_new Read original post