Skip to content

Stop interpreting x-nullable - #4

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/remove-x-nullable-support
Aug 19, 2026
Merged

Stop interpreting x-nullable#4
ChiragAgg5k merged 1 commit into
mainfrom
fix/remove-x-nullable-support

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

  • stop treating the non-standard x-nullable extension as schema nullability
  • exclude it when lifting OpenAPI 2.0 parameter fields into schemas
  • preserve it only as an uninterpreted schema extension and update cross-version fixtures

Validation

  • composer check

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown

Greptile Summary

The PR stops interpreting the vendor-specific x-nullable extension as canonical schema nullability.

  • Removes x-nullable from OpenAPI 2.0 parameter fields lifted into synthesized schemas.
  • Preserves schema-level x-nullable as opaque extension metadata.
  • Updates unit tests and cross-version fixtures to reflect the revised behavior.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issues identified.

The parser and tests consistently implement the stated opaque-extension contract while retaining dedicated coverage for standard OpenAPI 3.0 and 3.1 nullability.

Important Files Changed

Filename Overview
src/Parser/Schema/Reader.php Removes the x-nullable fallback from schema nullability and excludes the extension from OpenAPI 2.0 parameter-field lifting, consistently implementing the stated behavior.
tests/Schema/ReaderTest.php Verifies that standard nullable remains supported, schema-level x-nullable stays opaque, and parameter lifting excludes it.
tests/CrossVersionFixtureTest.php Updates canonical cross-version expectations so the fixture nickname is non-nullable in all dialects.
tests/Fixtures/openapi-2.0.json Removes the non-standard nullability extension from the equivalent OpenAPI 2.0 fixture.
tests/Fixtures/openapi-3.0.json Removes standard nullability from the OpenAPI 3.0 fixture to preserve cross-version semantic equivalence.
tests/Fixtures/openapi-3.1.json Removes the null type from the OpenAPI 3.1 fixture to preserve cross-version semantic equivalence.

Reviews (1): Last reviewed commit: "fix: stop interpreting x-nullable" | Re-trigger Greptile

@ChiragAgg5k
ChiragAgg5k merged commit cb7367e into main Aug 19, 2026
5 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/remove-x-nullable-support branch August 19, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant