Skip to content

Generate Class#openapi_nullable methods #19

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 6 commits into from
Jan 13, 2021
Merged

Generate Class#openapi_nullable methods #19

merged 6 commits into from
Jan 13, 2021

Conversation

biglovisa
Copy link
Contributor

What

Fixes #5. Adding generated method .openapi_nullable to models

Why

This method was removed ~9 months back and was breaking the #to_hash method on the models.

SDK Release Checklist

  • Have you added an integration test for the changes?
  • Have you built the gem locally and made queries against it successfully?
  • Did you update the changelog?
  • Did you bump the package version?
  • For breaking changes, did you plan for the release of the new SDK versions and deploy the API to production?

@biglovisa biglovisa self-assigned this Jan 8, 2021
@biglovisa biglovisa added the Needs Review The PR is ready to be reviewed label Jan 8, 2021
@biglovisa biglovisa requested a review from bspellacy January 11, 2021 13:42
Copy link
Member

@bspellacy bspellacy left a comment

Choose a reason for hiding this comment

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

This looks good - can we add a test for the methods that weren't working before to prevent this from happening again?

@bspellacy bspellacy added Reviewed This PR has been reviewed, but still needs some changes. and removed Needs Review The PR is ready to be reviewed labels Jan 11, 2021
@biglovisa biglovisa added Needs Review The PR is ready to be reviewed and removed Reviewed This PR has been reviewed, but still needs some changes. labels Jan 12, 2021
@biglovisa biglovisa requested a review from bspellacy January 12, 2021 14:38
@bspellacy
Copy link
Member

Sorry - I should have been more clear! The specs you added look great, but it was my understanding that #to_hash and #to_h were broken and those are the methods we should test.

@biglovisa
Copy link
Contributor Author

Ah yes - makes more sense, thanks for clarifying! I took the opportunity to create some shared examples instead for the generated classes. Currently we only cover the .openapi_nullable and #to_hash methods, but this can be added on to over time.

@bspellacy bspellacy added Ready This PR is ready to ship! and removed Needs Review The PR is ready to be reviewed labels Jan 13, 2021
@biglovisa biglovisa merged commit d0d3893 into main Jan 13, 2021
@biglovisa biglovisa deleted the lovisa/fix-hash branch January 13, 2021 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready This PR is ready to ship!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling to_hash method on Ruby models causes a NoMethodError
2 participants