Skip to content

fix(opencode): dedupe event openapi refs#28892

Draft
sainzs wants to merge 1 commit into
anomalyco:devfrom
sainzs:fix/openapi-event-dedupe
Draft

fix(opencode): dedupe event openapi refs#28892
sainzs wants to merge 1 commit into
anomalyco:devfrom
sainzs:fix/openapi-event-dedupe

Conversation

@sainzs
Copy link
Copy Markdown

@sainzs sainzs commented May 22, 2026

Issue for this PR

Closes #28826

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The OpenAPI generator was adding some event payload schemas through both the bus event list and the core EventV2 list. This dedupes those schema refs before writing the Event and GlobalEvent.payload unions, so generated OpenAPI output no longer lists the same EventSessionNext* schemas twice.

The regression test checks both affected OpenAPI unions for duplicate refs.

How did you verify your code works?

  • bun test test/server/httpapi-public-openapi.test.ts: pass
  • bun typecheck from packages/opencode: pass
  • pre-push bun turbo typecheck: pass

Screenshots / recordings

N/A, API schema output only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

AI-assisted; human-reviewed, locally tested, and I can explain/iterate on the change.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

GlobalEvent / Event OpenAPI schemas list every EventSessionNext* event twice

1 participant