Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't attempt to create result schemas for method without results #541

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mesjaam
Copy link

@mesjaam mesjaam commented Jan 13, 2025

When a method's result is omitted (for a notification), the type generator will still try to include the result in the document's schemas. This produces the following error:

TypeError [Error]: Cannot destructure property 'schema' of 'undefined' as it is undefined.

I have attempted to fix this only for typescript, as I was generating a schema for that language.

@mesjaam mesjaam marked this pull request as draft January 13, 2025 14:50
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c635be0) to head (4ce935c).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #541   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          168       168           
  Branches        24        24           
=========================================
  Hits           168       168           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mesjaam mesjaam marked this pull request as ready for review January 13, 2025 15:31
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.

2 participants