2404 stack 3 document metadata and paths - #2446
Open
correct-horse-battery-bench wants to merge 3 commits into
Open
2404 stack 3 document metadata and paths#2446correct-horse-battery-bench wants to merge 3 commits into
correct-horse-battery-bench wants to merge 3 commits into
Conversation
correct-horse-battery-bench
force-pushed
the
2404-stack-3-document-metadata-and-paths
branch
from
August 18, 2026 07:44
1126005 to
53f588a
Compare
s3inlc
approved these changes
Aug 18, 2026
correct-horse-battery-bench
marked this pull request as ready for review
August 18, 2026 14:10
…izer Title and version were built by SpecBuilder, while description and contact were filled in afterwards by SpecSanitizer. The two halves of the same info object lived in different classes, and the raw spec (which the builder tests and the fixtures compare against) was missing them. Build the whole info object in SpecBuilder, so both spec variants identify the API the same way, and state the license of the server beside them, which neither half carried before. The sanitizer no longer touches info at all. Move the coverage accordingly: the SpecSanitizerTest case is replaced by one FullSpecTest case asserting the info of both variants. The fixtures now carry the full info object, and the published spec gains the license.
The generator keyed its paths by the raw Slim pattern, constraints and all
("/api/v2/ui/configs/{id:[0-9]+}/{relation:configSection}"), and SpecSanitizer
rewrote them into path templates as one of its phases. Everything in between
therefore worked on strings that are not valid OpenAPI paths: StaticFragments
had to spell out a regex constraint to hit the right path item, and the raw
spec the builder tests and fixtures assert against was never a valid document.
Translate the pattern into a path template in RouteIntrospector, where the
route is resolved, and carry both on RouteTarget. The path template is what the
spec is keyed by; the raw pattern stays available because a constraint encodes
more than a validation rule, namely the relation name of a relationship route,
which ModelApiPathBuilder still reads from it.
Consequently the sanitizer loses its path cleaning phase (the remaining phases
are renumbered) and StaticFragments addresses the importFile paths by template.
The relationship routes of one model collapse into a single templated path item
now, which is what the sanitized spec always contained, so openapi.json is
unchanged; the fixtures show the collapse because they snapshot the raw spec.
RouteIntrospectorTest covers the translation, including the balanced braces of
a quantifier inside a constraint, which the two removed sanitizer cases used to
cover.
The sanitizer collected the tag names of all operations and declared each as a bare name. A reader of the document, and every tool that renders it, was left with a heading and nothing under it, which is also what Redocly reported as its tag-description warning. Derive the description from the operations carrying the tag: the collection they are served under, and whether that collection can be modified, which follows from the methods those operations use. The tags that do not describe a resource collection (Helpers, Login, Authentication) are named explicitly.
correct-horse-battery-bench
force-pushed
the
2404-stack-3-document-metadata-and-paths
branch
from
August 18, 2026 14:37
53f588a to
3283eda
Compare
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.
/api/v2/ui/crackertypes/{id:[0-9]+}/{relation:crackerVersions}
Make sure the paths are valid:
/api/v2/ui/crackertypes/{id}/{relation}