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: treat nullable property as optional #2001

Merged
merged 1 commit into from
May 16, 2024

Conversation

janne-slamcore
Copy link
Contributor

Description

Add a test for a required, but nullable, union type and update the Pydantic preset to treat nullable properties as optional.

Related Issue

Fixes #2000

Checklist

  • The code follows the project's coding standards and is properly linted (npm run lint).
  • Tests have been added or updated to cover the changes.
  • Documentation has been updated to reflect the changes.
  • All tests pass successfully locally.(npm run test).

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link

netlify bot commented May 16, 2024

Deploy Preview for modelina canceled.

Name Link
🔨 Latest commit da209b0
🔍 Latest deploy log https://app.netlify.com/sites/modelina/deploys/6645ec01277001000767e492

Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9111354819

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 92.303%

Totals Coverage Status
Change from base Build 9108384335: 0.003%
Covered Lines: 5996
Relevant Lines: 6327

💛 - Coveralls

Copy link
Member

@jonaslagoni jonaslagoni left a comment

Choose a reason for hiding this comment

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

Thanks @janne-slamcore 🤙

@jonaslagoni jonaslagoni merged commit 5a05283 into asyncapi:master May 16, 2024
25 checks passed
@jonaslagoni
Copy link
Member

@all-contributors please add @janne-slamcore for code, test

Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @janne-slamcore! 🎉

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 3.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Pydantic generator does not correctly handle nullable union
4 participants