Skip to content

fix(schemas): remove false exclusivity from Resource navigation - #782

Merged
duglin merged 3 commits into
xregistry:mainfrom
marcschier:fix/pr574-resource-navigation
Nov 6, 2026
Merged

duglin merged 3 commits into
xregistry:mainfrom
marcschier:fix/pr574-resource-navigation

Conversation

@marcschier

Copy link
Copy Markdown
Contributor

Issue: A navigation oneOf rejects a Resource containing both
versionsurl and inlined versions, as well as requests omitting both.

Current specification: collections:

<COLLECTION>url and <COLLECTION>count are OPTIONAL in requests and MUST
be silently ignored by the server if present.

The same clause permits inlined collection contents alongside their URL.

Proposed change: Describe the navigation properties without imposing
exclusive-or presence. Preserve view-specific requirements and leave
document-carrier exclusivity to its separate rule.

Extracted from xregistry/spec#574.

Remove false exclusivity from Resource navigation.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@duglin duglin added the Easy label Oct 28, 2026
@clemensv

clemensv commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

LGTM

"versions"
]
"versionsurl": {
"type": "string"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't this some kind of url type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generator now emits the URI format for versionsurl: "versionsurl": {"type": "string", "format": "uri"}. I regenerated the JSON Schema and OpenAPI artifacts for Schema and CloudEvents, and verified the format in all four outputs. Core’s example defines the value as "versionsurl": "<URL>" (spec); the generated field is in generate_json_schema().

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Comment thread tools/schema-generator.py Resolved
@marcschier

Copy link
Copy Markdown
Contributor Author

@duglin @clemensv please re-review

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@duglin

duglin commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Approved on the 11/6 call

@duglin
duglin merged commit ee26704 into xregistry:main Nov 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants