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: non-required properties are required by constructor #553

Merged
merged 7 commits into from
Jan 10, 2022

Conversation

mahakporwal02
Copy link
Contributor

Description
The JavaScript generator created constructors that requires non-required properties.
Added a filter function that only filters required properties.

Related issue(s)
Fixes #538

@mahakporwal02 mahakporwal02 changed the title fix: Non-required properties are required by constructor fix: non-required properties are required by constructor Jan 3, 2022
@mahakporwal02
Copy link
Contributor Author

@jonaslagoni I just realised one of the tests is failing. I'll update the test later today.

@jonaslagoni
Copy link
Member

You can update the changed snapshots with npm run test -- -u 🙂

@coveralls
Copy link

coveralls commented Jan 5, 2022

Pull Request Test Coverage Report for Build 1679100122

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 93.366%

Totals Coverage Status
Change from base Build 1679088016: 0.0%
Covered Lines: 2348
Relevant Lines: 2397

💛 - Coveralls

@mahakporwal02
Copy link
Contributor Author

@jonaslagoni Sorry I missed your previous comment and changed the tests by updating the test cases instead of the snapshots.
Kindly have a look if this works or should I anyway update the snapshots only?

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.

Just have a small suggestion, otherwise it looks good 👍 🙂

examples/javascript-use-cjs/index.ts Outdated Show resolved Hide resolved
examples/generate-javascript-models/index.ts Outdated Show resolved Hide resolved
examples/javascript-use-esm/index.ts Outdated Show resolved Hide resolved
examples/javascript-use-esm/index.ts Outdated Show resolved Hide resolved
examples/javascript-use-cjs/index.ts Outdated Show resolved Hide resolved
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.

Perfect 🎉

@jonaslagoni
Copy link
Member

jonaslagoni commented Jan 7, 2022

/rtm

@jonaslagoni
Copy link
Member

jonaslagoni commented Jan 7, 2022

👀 Well, it should not complain about that... Gonna need to figure out why

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jonaslagoni jonaslagoni merged commit d84b8b5 into asyncapi:master Jan 10, 2022
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.42.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jonaslagoni
Copy link
Member

@all-contributors please add @mahakporwal02 for code

@allcontributors
Copy link
Contributor

@jonaslagoni

I've put up a pull request to add @mahakporwal02! 🎉

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.0.0-next.23 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-required properties are required by constructor
4 participants