Skip to content

[OpenAPI 3.1] Phase 2: engine reads 3.1 fields, keyword-based logic #950

Open
0 of 2 issues completed
Open

Description

@DrSatyr

Part of the OpenAPI 3.1 plan: #942 (Stage 1, Phase 2)

Goal

The diff engine reads only 3.1 fields and picks its comparison logic by keyword, not by Java class.

Scope

One area per PR:

  • Types and null: compare the set of non-null types; "null" only goes through the null rule
  • Numeric bounds: effective bound (value + inclusive/exclusive)
  • Array/items: compare items for any schema that has it (not only ArraySchema)
  • allOf/anyOf/oneOf: flatten allOf/anyOf and compare oneOf members for any schema (not only ComposedSchema); flattening stays as today

Small helpers (SchemaTypes, NumericBounds) in utils keep this in one place. While this phase is in progress they accept both 3.0 and 3.1 shapes. Only existing verdict rules are used.

Done when

  • All existing tests green, no change in 3.0 verdicts
  • Paired fixtures for every area pass for 3.1→3.1
  • No reads of getType(), getNullable(), boolean getExclusiveMinimum/Maximum(), getExample() or instanceof on schema classes left in the engine

Related PR: #938

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions