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

feat: add option to Csharp generator allowing user to generate records instead of classes #1191

Conversation

henrikjon
Copy link
Contributor

Description
This PR adds an option to the C# generator allowing it to render records instead of classes. This is done using a new renderer that implements self, property and additionalContent hooks. It does not support using the autoimplementedProperties as option as this is instead a default when generating records.

Related issue(s)
Resolves #1153

@netlify
Copy link

netlify bot commented Mar 26, 2023

Deploy Preview for modelina ready!

Name Link
🔨 Latest commit 58a38c1
🔍 Latest deploy log https://app.netlify.com/sites/modelina/deploys/64202825e1b8c20008adf859
😎 Deploy Preview https://deploy-preview-1191--modelina.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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.

@sonarcloud
Copy link

sonarcloud bot commented Mar 26, 2023

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

@henrikjon henrikjon changed the title feat: Add option to Csharp generator allowing user to generate records instead of classes feat: add option to Csharp generator allowing user to generate records instead of classes Mar 26, 2023
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.

LGTM 🔥

@jonaslagoni
Copy link
Member

/rtm

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4524262352

  • 35 of 35 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 92.424%

Totals Coverage Status
Change from base Build 4510666441: 0.02%
Covered Lines: 4767
Relevant Lines: 5026

💛 - Coveralls

@jonaslagoni jonaslagoni merged commit f632df7 into asyncapi:master Mar 26, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jonaslagoni
Copy link
Member

@all-contributors please add @henrikjon for code, test, doc, example

@allcontributors
Copy link
Contributor

@jonaslagoni

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

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.0-next.6 🎉

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.

Add support for records with the C# generator through an option
4 participants