Skip to content

fix: resolve dangling StepLogPartial $ref breaking SDK generation#146

Merged
mstrivens merged 1 commit into
mainfrom
fix/steplogpartial-dangling-ref
Jul 21, 2026
Merged

fix: resolve dangling StepLogPartial $ref breaking SDK generation#146
mstrivens merged 1 commit into
mainfrom
fix/steplogpartial-dangling-ref

Conversation

@mstrivens

Copy link
Copy Markdown
Contributor

Problem

SDK generation is failing at the Validating Document step:

ERROR validation error: [line 67901:2886] resolution-json-schema - not found
  -- key StepLogPartial not found in sequencedmap.Map

In https://api.eu1.stackone.com/oas/stackone.json:

components.schemas.UnifiedLogsPartialLegacy.properties.step_requests.items
  → $ref: "#/components/schemas/StepLogPartial"   ← not defined anywhere

Upstream renamed that schema to StepLogPartialLegacy and missed this one reference.

Evidence for the rename

Not a guess. The property set in the previously-generated stackone-client-typescript StepLogPartial model — request_id, start_time, end_time, account_id, project_id, http_method, path, url, status, duration, success, provider, service, resource, child_resource, sub_resource, action, is_worker, id — is an exact match for today's StepLogPartialLegacy.

Fix

Retargets the $ref via overlay, following the existing ActionsRpcResponse workaround already in this file (same class of bug, same file).

Verification

speakeasy run locally (v1.638.0): validation passes, SDK generated successfully ✓. The run only fails afterwards at Snapshotting Code Samples on a local auth-org mismatch (s1 vs stackone), unrelated to the spec.

Follow-up (not in this PR)

This is a band-aid. The dangling ref is in the OAS producer (unified-cloud-api), so every SDK consuming this spec has the same broken ref. Worth fixing the UnifiedLogsPartialLegacy DTO at source and then dropping both overlay workarounds.

🤖 Generated with Claude Code

Generation was failing validation with:

  ERROR resolution-json-schema - not found -- key StepLogPartial not
  found in sequencedmap.Map

UnifiedLogsPartialLegacy.properties.step_requests.items refs
#/components/schemas/StepLogPartial, which is not defined anywhere in
stackone.json. Upstream renamed the schema to StepLogPartialLegacy but
missed this reference.

Confirmed the rename rather than guessing: the property set in the
previously-generated stackone-client-typescript StepLogPartial model
(request_id, http_method, is_worker, sub_resource, ...) is an exact
match for today's StepLogPartialLegacy.

Retargets the ref via overlay, matching the existing ActionsRpcResponse
workaround in this file. The real fix belongs in the OAS producer.

Verified locally with speakeasy 1.638.0: validation passes and the SDK
generates successfully.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 20, 2026 17:27
@mstrivens
mstrivens requested a review from a team as a code owner July 20, 2026 17:27

Copilot AI 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.

Pull request overview

This PR updates the Speakeasy Ruby overlay to fix a broken OpenAPI schema reference that causes SDK generation to fail during document validation.

Changes:

  • Retarget components.schemas.UnifiedLogsPartialLegacy.properties.step_requests.items.$ref from the missing StepLogPartial to the existing StepLogPartialLegacy.
  • Preserve the existing overlay workaround pattern already used in this repo for missing/incorrect upstream schemas (e.g., ActionsRpcResponse).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mstrivens
mstrivens merged commit 20ba1c1 into main Jul 21, 2026
1 check passed
@mstrivens
mstrivens deleted the fix/steplogpartial-dangling-ref branch July 21, 2026 08:37
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.

3 participants