Skip to content

Schema Generator: Invalid Avro for "*" collections#416

Merged
duglin merged 2 commits into
xregistry:mainfrom
clemensv:clemensv/issue352
Oct 30, 2025
Merged

Schema Generator: Invalid Avro for "*" collections#416
duglin merged 2 commits into
xregistry:mainfrom
clemensv:clemensv/issue352

Conversation

@clemensv

Copy link
Copy Markdown
Contributor

Fixes #352 #351

Signed-off-by: Clemens Vasters clemens@vasters.com

Fixes #

Introducing generic record type for "*" fields. Namespacing for types.

Fixes xregistry#352

Signed-off-by: Clemens Vasters <clemens@vasters.com>
@clemensv clemensv mentioned this pull request Oct 27, 2025
Fixes xregistry#351 - Invalid Avro schema with inline GenericRecord definitions
Fixes xregistry#352 - Namespace separation and format-specific schema structures

Changes:
- Fixed Avro schema to emit GenericRecord once at document level
- Implemented namespace separation for Avro (io.xregistry.{group})
- Implemented format-specific structures:
  * OpenAPI: Flat keys in components.schemas
  * JSON Schema: Nested structure with -schema suffix
- Added openapi-spec-validator for proper OpenAPI compliance
- Created comprehensive test suite (22 tests, all passing)
- Regenerated all production schema files

Technical details:
- GenericRecord uses qualified names (io.xregistry.GenericRecord)
- Extensions fields reference GenericRecord instead of inline definition
- OpenAPI 3.0 spec requires flat keys, not nested objects
- JSON Schema Draft 7 supports nested structures
- Both formats work with JSON Pointer references

Signed-off-by: Clemens Vasters <clemens@vasters.com>
@duglin

duglin commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Approved on 10/30

@duglin
duglin merged commit 20f989b into xregistry:main Oct 30, 2025
2 checks passed
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.

Schema Generator: Invalid Avro for "*" collections

2 participants