Skip to content

feat(flow-php/etl-adapter-json): JSON Schema to Flow schema converte#2510

Merged
norberttech merged 3 commits into
1.xfrom
json-schema-converter
Jul 5, 2026
Merged

feat(flow-php/etl-adapter-json): JSON Schema to Flow schema converte#2510
norberttech merged 3 commits into
1.xfrom
json-schema-converter

Conversation

@norberttech

Copy link
Copy Markdown
Member

Resolves: #1868

Change Log


Added

  • flow-php/etl-adapter-json - bidirectional JSON Schema converter with schema_from_json_schema() and schema_to_json_schema() DSL functions
  • flow-php/etl-adapter-json - $ref resolution for internal pointers, local files and remote http(s) documents via PSR-18 client, with circular reference detection
  • flow-php/etl-adapter-json - combinator support: allOf deep merge, anyOf/oneOf as nullable or union types, boolean schemas
  • flow-php/etl-adapter-json - JSON Schema annotations preserved in definition metadata under json_schema.* keys
  • flow-php/etl - UnionDefinition and union_schema() DSL function for union type schema definitions

Fixed

Changed

Removed

Deprecated

Security

- bidirectional SchemaConverter with schema_from_json_schema() /
schema_to_json_schema() DSL (gh-1868)
- $ref resolution: internal pointers, relative files, remote http(s) via
PSR-18 client, with cycle detection
- full combinator support: allOf deep merge, anyOf/oneOf as nullable or
union types
- annotations preserved in definition metadata (json_schema.* keys) and
re-emitted on conversion back
- core: UnionDefinition + union_schema() DSL so heterogeneous unions are
representable in Schema
- boolean schemas: true accepted and emitted for accept-anything
properties, false rejected
@norberttech norberttech added this to the 0.42.0 milestone Jul 5, 2026
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.65693% with 64 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.97%. Comparing base (2d2e067) to head (36a95c9).
⚠️ Report is 1 commits behind head on 1.x.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2510      +/-   ##
============================================
+ Coverage     85.92%   85.97%   +0.04%     
- Complexity    21923    22238     +315     
============================================
  Files          1653     1662       +9     
  Lines         67687    68370     +683     
============================================
+ Hits          58163    58784     +621     
- Misses         9524     9586      +62     
Components Coverage Δ
etl 88.61% <100.00%> (+0.12%) ⬆️
cli 89.40% <ø> (ø)
lib-array-dot 81.44% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 93.61% <ø> (ø)
lib-filesystem 85.97% <ø> (ø)
lib-types 90.18% <ø> (+0.12%) ⬆️
lib-parquet 70.10% <ø> (ø)
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.82% <ø> (ø)
lib-dremel 0.00% <ø> (ø)
lib-postgresql 88.62% <ø> (ø)
lib-telemetry 86.58% <ø> (ø)
bridge-filesystem-async-aws 92.74% <ø> (ø)
bridge-filesystem-azure 90.45% <ø> (ø)
bridge-monolog-http 96.82% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 92.07% <ø> (ø)
symfony-http-foundation 78.57% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.41% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 90.66% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.39% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.23% <ø> (ø)
adapter-chartjs 84.05% <ø> (ø)
adapter-csv 91.43% <ø> (ø)
adapter-doctrine 90.79% <ø> (ø)
adapter-google-sheet 99.18% <ø> (ø)
adapter-http 72.34% <ø> (ø)
adapter-json 88.71% <88.75%> (+0.08%) ⬆️
adapter-logger 50.00% <ø> (ø)
adapter-parquet 77.70% <ø> (ø)
adapter-text 74.13% <ø> (ø)
adapter-xml 83.40% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 94.21% <ø> (ø)
adapter-postgresql 91.06% <ø> (ø)
adapter-seal 85.42% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.32% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…actory

- new EntryTypeResolver picks the first union member accepting the
value, falling back to the first castable one
- nullable union definitions no longer crash on OptionalType wrapping
- schemas with union definitions (e.g. from schema_from_json_schema())
now work with extractors via withSchema()
@norberttech norberttech merged commit 62540a4 into 1.x Jul 5, 2026
39 checks passed
@norberttech norberttech deleted the json-schema-converter branch July 5, 2026 17:18
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Proposal]: JSON schema converter to flow-php schema

1 participant