-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Generated c# interface for Client with internal modifier on DTO classes should be internal too #1363
Comments
The problem is that internal (or any fine grained modifieres) cannot be expressed by Swagger/JSON Schema... |
Interesting. We could generate multiple results instead, one carrying the Swagger/Json Schema and the other is an optional file containing information regarding access modifiers. |
I think it would be better to implement a custom json schema processor class (NJsonSchema) which adds a new property (extension, via ExtensionData), eg ‘x-modifier’ and extend the template engine so that you can easily modify the modifieres with a custom extension... |
Ping me if you have time to help here... thx |
If the DTOs are being generated as internal, then the interface should follow the same, otherwise you will get |
Any update on this one? |
I think this file Client.Interface.liquid would need to use the @RicoSuter Does this make sense? If this change was added would it be accepted in a PR? Did I identify the the correct variable that can be updated in the interface template reference? The interface must have at most the same level of access modified as the models it uses. |
Valid Modifiers:
Invalid ModifiersAll of these modifieds will error out with CS1527 Elements defined in a namespace cannot be explicitly declared as private, protected, protected internal, or private protected
Combinations
|
Hi, @RicoSuter or anyone else with enough rights on this repo, would that be possible to have a look at #4820 and see what's going on with the Macos build? PR is (I think) ready to be merged but is stuck because of this... Thanks a lot 🙏 |
MacOS build failures should be fixed by #4896 , but it's not necessary to accept pending PRs. I should be OK if both Ubuntu and Windows build succeed. |
Ok that's good news. Thanks for your fast reply ! |
A public interface ist generated for a client that has access modifier set to
internal
and DTO classes have access modifierinternal
too.The generated interface should have
internal
modifier too.The text was updated successfully, but these errors were encountered: