Open alefcarlos opened 3 weeks ago
Hey! This is a great project !
It would be cool if the HubMethodNameAttribute is applied replace the methodName on jsonSpec.
HubMethodNameAttribute
[Authorize] public class TrackingsHub : Hub<ITrackingsClientContract>, ITrackingsHub { [HubMethodName("subscribe-pusher")] public async Task<ReplyPayload> SubscribePushersAsync(SubscribeOptions options) { ..... } }
[ { "name": "TrackingsHub", "path": "/hubs/trackings", "isAuthRequired": true, "hubType": { "interfaceName": "ITrackingsHub", "interfaceFullName": "global::Hbsa.Navigation.Tracker.Hubs.Client.ITrackingsHub", "collisionFreeName": "global__Hbsa_Navigation_Tracker_Hubs_Client_ITrackingsHub", "methods": [ { "methodName": "subscribe-pusher", 👈Here "returnType": "global::System.Threading.Tasks.Task<global::Hbsa.Navigation.Tracker.Hubs.Client.Contracts.ReplyPayload>", "isGenericReturnType": true, "genericReturnTypeArgument": "global::Hbsa.Navigation.Tracker.Hubs.Client.Contracts.ReplyPayload", "parameters": [ { "name": "options", "typeName": "global::Hbsa.Navigation.Tracker.Hubs.Client.SubscribeOptions" } ] }, ] } } ]
If you accept I could help with a PR ;)
Related: https://github.com/nenoNaninu/TypedSignalR.Client.TypeScript/issues/139
Hey! This is a great project !
It would be cool if the
HubMethodNameAttribute
is applied replace the methodName on jsonSpec.If you accept I could help with a PR ;)