Keep author-set schema titles and accept Tag objects on operations - #20
Merged
tymondesigns merged 1 commit intoSep 15, 2026
Conversation
When embedding a JsonSchema, strip constructor titles but keep titles set via title() that differ from getInitialTitle(). Operation::tags() now accepts Tag|string and resolves Tag objects to their names. Co-authored-by: Sean Tymon <tymondesigns@users.noreply.github.com>
tymondesigns
deleted the
cursor/keep-deliberate-schema-titles-and-accept-tag-objects-bbee
branch
September 15, 2026 22:00
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.
Summary
Implements OA-1 and OA-2 from the OpenAPI 3.1 porting feedback. JSON Schema items (
JS-*) are out of scope.OA-1 — Keep deliberate titles when embedding a JsonSchema
BuildsArray::unwrapValue()always passedincludeTitle: false, which dropped both factory/constructor titles and titles set with->title().cortexphp/json-schema1.3.0 already distinguishes them:getInitialTitle()is the constructor argument andgetTitle()is the current value. They differ only when the author called->title()with a different string.Embedding now:
$schema(unchanged)getTitle() !== null && getTitle() !== getInitialTitle()Reproductions from the feedback:
OA-2 —
Operation::tags()acceptsTag|stringCallers that already hold a
Tagno longer need->getName(). String tags remain valid.Other
One-line Rector cleanup on
Response::$descriptionsocomposer format:checkpasses with the current Rector version.Test plan
composer format:check(Rector + ECS)