Skip to content

Conversation

@norwd
Copy link

@norwd norwd commented Jun 27, 2025

This makes the Client.Interface.liquid template match the Client.Class.liquid template. This will prevent CS0050 from occurring when the clientClassAccessModifier and typeAccessModifier settings are set to internal.

Currently CS0050 is thrown when these settings are set to internal because the interface is public while the types in the method signatures are internal.

This makes the `Client.Interface.liquid` template match the [`Client.Class.liquid`](https://github.com/RicoSuter/NSwag/blob/3cc1c36c7f9d632174bd6b478311879cb343251a/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid#L3) template. This will prevent CS0050 from occurring when the `clientClassAccessModifier` and `typeAccessModifier` settings are set to `internal`.

Currently CS0050 is thrown when these settings are set to `internal` because the interface is `public` while the types in the method signatures are `internal`.
@norwd
Copy link
Author

norwd commented Jun 27, 2025

Resolves #1363 and #5105

@lahma
Copy link
Collaborator

lahma commented Jun 27, 2025

Thanks for the suggestion, #4820 won here as it was first and also contains tests for the change.

@lahma lahma closed this Jun 27, 2025
@norwd
Copy link
Author

norwd commented Jun 29, 2025

@lahma, no worries, glad I could revitalise #1363 and get it resolved 🙂

Any idea when this might be released?

@lahma
Copy link
Collaborator

lahma commented Jun 30, 2025

My stock answer.. don't know about next release but you can always get a preview from MyGet...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants