Skip to content

Skip resolving in #/components/examples #977

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

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Skip resolving in #/components/examples #977

merged 1 commit into from
Nov 10, 2022

Conversation

drwpow
Copy link
Contributor

@drwpow drwpow commented Nov 10, 2022

Changes

Fixes #975. $refs in #/components/examples were trying to be parsed as valid OpenAPI schema objects which are not.

This is a quick fix to simply ignore example objects because they can be rather lengthy and have no expected type generation. Open to suggestions on improvements to adding examples if there’s a good way to do so without generating comments thousands of lines long.

How to Review

  • Tests should pass

Checklist

  • Unit tests updated
  • README updated
  • examples/ directory updated (if applicable)

Copy link

@wolfy1339 wolfy1339 left a comment

Choose a reason for hiding this comment

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

Seems there are some mixups between github and octokit in the tests

@drwpow
Copy link
Contributor Author

drwpow commented Nov 10, 2022

@wolfy1339 I added the schema that was breaking in your CI error. Not sure if it would be helpful to have other schemas here to test just to make sure they’re generating as expected. Would happily accept PRs adding any you’d like to.

@drwpow drwpow changed the title Skip resolving in components.examples Skip resolving in #/components/examples Nov 10, 2022
@drwpow drwpow merged commit 1fdaa2d into main Nov 10, 2022
@drwpow drwpow deleted the octokit branch November 10, 2022 02:42
@drwpow
Copy link
Contributor Author

drwpow commented Nov 10, 2022

Released in v6.0.2!

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.

Cannot read properties of undefined (reading 'schema')
2 participants