Skip to content

fix(generator-openapi): resolve schemas/params when operationId is missing#338

Open
thorthelegend99 wants to merge 2 commits intoevent-catalog:mainfrom
thorthelegend99:fix/openapi-no-operationid-schema-lookup
Open

fix(generator-openapi): resolve schemas/params when operationId is missing#338
thorthelegend99 wants to merge 2 commits intoevent-catalog:mainfrom
thorthelegend99:fix/openapi-no-operationid-schema-lookup

Conversation

@thorthelegend99
Copy link

Summary

  • fix OpenAPI schema/parameter lookup when operationId is missing
  • keep existing lookup by operationId when present
  • add fallback lookup by path + method for operations without IDs
  • add regression test ensuring no-operationId endpoints get correct schemas and parameter sections

Why

Issue #219 reports that missing operation IDs can lead to incorrect or missing schemas/parameters. The previous lookup used only operationId, which can be undefined across multiple operations.

This change makes schema extraction deterministic for no-operationId specs.

Tests

  • corepack pnpm --filter @eventcatalog/generator-openapi format
  • corepack pnpm --filter @eventcatalog/generator-openapi test -- --run
  • corepack pnpm --filter @eventcatalog/generator-openapi build

Related

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: 8f7ba51

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eventcatalog/generator-openapi Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Feb 16, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ boyney123
❌ Thor


Thor seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

OpenAPI: generator does not generate schemas if operation ids are missing for routes

3 participants