You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the OpenAPI 3.1 plan: #942 (Stage 1, Phase 1)
Goal
A converter that turns Swagger 2.0 / OpenAPI 3.0 objects into the 3.1 form. Not wired in yet.
Scope
New package org.openapitools.openapidiff.core.normalize, called once per spec
Walks every schema: components, parameters, headers, request/response bodies, callbacks, and nested (properties, items, additionalProperties, allOf/anyOf/oneOf, not)
Rules: type → types; nullable: true → "null" in types (not when there is no type); boolean exclusiveMinimum/Maximum → numeric; example → examples; typed classes → JsonSchema
Works on a copy (JSON round-trip with swagger-core's mapper), so the input objects are never modified
Done when
Converted 3.0 == natively parsed 3.1 (compared as serialized JSON) for all paired fixtures
Swagger 2.0 fixture converts correctly
Copy test: input objects are unchanged after conversion
Activity