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

C# generator does not render optional properties correctly #941

Closed
jonaslagoni opened this issue Oct 10, 2022 · 3 comments
Closed

C# generator does not render optional properties correctly #941

jonaslagoni opened this issue Oct 10, 2022 · 3 comments
Labels
bug Something isn't working released on @next
Milestone

Comments

@jonaslagoni
Copy link
Member

Describe the bug

As seen in the following example, the C# generator does not render optional properties string? as it does on master:
https://github.com/asyncapi/modelina/blob/next/examples/csharp-generate-required-properties/__snapshots__/index.spec.ts.snap
https://github.com/asyncapi/modelina/blob/master/examples/csharp-generate-required-properties/__snapshots__/index.spec.ts.snap

@jonaslagoni jonaslagoni added the bug Something isn't working label Oct 10, 2022
@jonaslagoni jonaslagoni added this to the Version 1.0.0 milestone Oct 11, 2022
@zaytsevand
Copy link
Contributor

@jonaslagoni looks like this bug was fixed, but with a side-effect. I've added two examples to demonstrate erroneous output.

  public class OrderCreate
  {
    public string? SampleCategory { get; set; } // <- optional autoproperties are fine
    public stringfalse OrderId { get; set; } // <- required are bugged

@zaytsevand
Copy link
Contributor

Updated PR to fix the issue.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.0-next.37 🎉

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
bug Something isn't working released on @next
Projects
None yet
Development

No branches or pull requests

3 participants