Skip to content

Make externalDocs/url absolute in OpenAPI during bundling - #925

Merged
jviotti merged 1 commit into
mainfrom
bundle-fixes-oas
Oct 28, 2026
Merged

jviotti merged 1 commit into
mainfrom
bundle-fixes-oas

Conversation

@jviotti

@jviotti jviotti commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

View guided diff

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Oct 28, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Makes OpenAPI documentation links retain their targets when bundled documents move.

  • Resolves relative externalDocs.url values in entry and imported schemas.
  • Uses each schema's enclosing identifier or document base for resolution.
  • Leaves the field untouched when the schema dialect does not define it.
  • Restates documentation and example URIs in the entry document's OpenAPI shell.
  • Preserves absolute URI spellings and avoids canonicalizing rewritten documentation links.
  • Limits schema documentation traversal to actual subschemas rather than instance data.
  • Adds five CLI regression tests covering imports, nested identifiers, document bases, absolute URLs, and other dialects.
  • Updates vendored conversion logic to park and restore OpenAPI 3.0 annotations across intermediate drafts.
  • Also includes compiler pointer-lifetime, editor meta-schema handling, pointer concatenation, and MCP header-matching updates.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

sourcemeta::core::JSON::String restored{annotation};
this->renames_.emplace_back(sourcemeta::core::Pointer{parked},
sourcemeta::core::Pointer{restored});
schema.rename(parked, std::move(restored));

@augmentcode augmentcode Bot Oct 28, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could you check the generated-name case at vendor/blaze/src/convert/rules/carried_annotation_becomes_keyword.h:45? In an OpenAPI 3.0 Reference Object, an ignored sibling "sourcemeta-carried-readOnly": "data" becomes x-sourcemeta-carried-readOnly in UpgradeOpenAPI30ToDraft4::shadow() after the reservation pre-pass, so this phase promotes it into a non-boolean readOnly, producing an invalid Draft 2020-12 schema from previously ignored data.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@jviotti
jviotti merged commit 5c7cd83 into main Oct 28, 2026
16 checks passed
@jviotti
jviotti deleted the bundle-fixes-oas branch October 28, 2026 22:26
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.

1 participant