Repository navigation
fix(openapi): add relation x-* hints to output schemas too - #10
Merged
Merged
Conversation
Clients that build forms from the read schema never saw x-collection and friends, because resources with serialization groups have no plain schema and the decorator only handled input schemas. iri-reference fields then rendered as bare string inputs instead of the type-ahead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
schmunk42
approved these changes
Oct 9, 2026
schmunk42
left a comment
Member
There was a problem hiding this comment.
Approved — additive metadata, no breaking change.
Follow-ups:
- #11: the decorator applies the root class's relation hints to foreign definitions; this PR widens it to output schemas, so it should be fixed next (including the test offered here).
- dmstr/jedison-extender-bundle#2: link to the related record in read-only state — builds on the hints this PR adds to read schemas, and depends on #11.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
RelationFieldSchemaDecoratoronly decorated input schemas withx-collection,x-label-property,x-value-property,x-search-propertyandx-resource-class.Resources that declare serialization groups get no plain
<Name>schema from API Platform, only the grouped<Name>.jsonld-<group>.readand<Name>-<group>.writevariants. A client that builds its forms from the read schema (the Vue admin UI does) therefore never saw the hints, andiri-referencefields rendered as bare string inputs instead of the type-ahead fromdmstr/jedison-extender-bundle.Example before (
MenuNode.jsonld-menu_node.read):Change
The decorator now processes output schemas as well; the hints are purely additive metadata and harmless on reads. After this change the same read schema carries
"x-collection": "/api/admin/menus"and friends.Verified on a za7 stack with the admin UI: the
menuandparentfields on the MenuNode form show the type-ahead with members of/api/admin/menus//api/admin/menu_nodes.Notes
🤖 Generated with Claude Code