-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Generator for dotnet System.Text.Json.JsonConverter produces code that does not match case settings and does not compile. #1448
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
You are right, thanks for the issue @tomwolanski, nice description! Yea, the code tries to use the property name instead of the accessor name, which is always pascal case:
So this line here:
Needs to change to pascal case as well, at least that's what I currently think is wrong, feel free to correct me @tomwolanski 🙂 Wanna provide this change @tomwolanski? |
🎉 This issue has been resolved in version 1.8.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@all-contributors please add @tomwolanski for bug |
I've put up a pull request to add @tomwolanski! 🎉 |
Describe the bug
When generating a model the property name setting was kept to default value (PascalCase for dotnet). An option to generate json converter was also set. The output code does not compile due to property case mismatch.
How to Reproduce
Reproduced in modelina playground:
The sample api documment:
with code generator options:
produces model code with expected property format:
the conventer, however uses camel case naming to access those properties:
Expected behavior
The json converter code produced by the generator should be valid and possible to compile.
The text was updated successfully, but these errors were encountered: