Skip to content

Weird casing for IfNoneMatch argument in generated NSwag client #1467

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

Closed
verdie-g opened this issue Feb 17, 2024 · 3 comments
Closed

Weird casing for IfNoneMatch argument in generated NSwag client #1467

verdie-g opened this issue Feb 17, 2024 · 3 comments

Comments

@verdie-g
Copy link
Contributor

NSwag generates the argument as if_none_match when ifNoneMatch would be expected.

@bkoelman
Copy link
Member

Looks like this was created in the wrong repo.

@verdie-g
Copy link
Contributor Author

Oh I misread your comment #1459 (comment). Do you think a custom argument name generator should be provided in JADNC?

@bkoelman
Copy link
Member

The way I understand it (correct me if I'm wrong), adding /ParameterNameGenerator: in <Options> has no effect because the switch does not exist in NSwag. So the ask to NSwag would be to add a new switch to adhere to the C# naming conventions. Internally they would implement another IParameterNameGenerator for that, which becomes active when the new switch is used.

Another way could be to request them to add /ParameterNameGenerator:, but that becomes problematic when the implementation lives in another assembly. I find it more realistic that users want to comply with language conventions, than to make this fully customizable.

As far as I'm aware, there's nothing we can do within JADNC other than provide our own executable to generate the client code. Like I said, that goes a bit too far.

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

No branches or pull requests

2 participants