RicoSuter / SigSpec

Specification and code generator for SignalR Core.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discussion

RicoSuter opened this issue · comments

hi,

Have a question. Your approach not includes subclasses of abstract class i used in hub as a parameter.

Could you help me and point me to the documentation how to include subclasses?

The project uses NJsonSchema under the hood (same as NSwag), I think this would help you: https://github.com/RSuter/NJsonSchema/wiki/Inheritance

Is SignalR using Newtonsoft.Json to serialize params and responses?

thanks for help. Adding attribute was just enough and now everything is generated in spec.

Can generated Json be used with Swagger-UI to "pretty print" documentation? How?

@Repsakk The generated JSON is not OpenAPI/Swagger so it cannot be used in Swagger UI... I don't see a way to describe a SignalR endpoint with OpenAPI/Swagger...

@Ppiwow just keep in mind that this whole project is experimental and just a proof of concept :-)

Hi,
I am trying to generate TypeScript for more than one Hub and the only problem is, that in the output .ts file, there are duplicate import directions like this:
import { HubConnection, IStreamResult } from "@aspnet/signalr"

There is one for each of the hubs. Could you please point me in a direction how to avoid this?
Thanks!

@Alamaster99 this is currently a bug, as this template is repeated for each hub:
https://github.com/RSuter/SigSpec/blob/master/src/SigSpec.CodeGeneration.TypeScript/Templates/Hub.liquid

Please create a new issue for that bug...

This is an interesting project. I'd like to see a demo of it or meet with you to get ideas and your aspirations on future ideas. Any chance you'd have time for a sync?

@bradygaster Right now this is just a prototype/experiment project based on the work I did for NSwag and NJsonSchema... there is still a lot of stuff missing (e.g. tooling, C# client gen, an API UI, etc.). I'll be at the MVP Summit next week, we could meet there...

@bradygaster for a "demo", clone the repo and start the SigSpec.Console - it will output all generated artifacts based on the hub of the sample SignalR project in the solution.

Are you interested in Redux action/actioncreator generator templates (js) to add into the SigSpec project?

Yes, @RSuter i'll be at MVP next week and would love to meet up for a demo. Mind carving out some time to sync up during Summit?

@bradygaster sure, i’m flexible, will ping you via twitter when i’m there...

Are you interested in Redux action/actioncreator generator templates (js) to add into the SigSpec project?

I think it’s better to keep this ui framework independent and add extension methods to enhance with own templates... or at least there should be a vanilla js impl and on top of that an optional redux gen?

I am trying to generate the TS client from my Hub class. My intention is to separate the specification and the TS client generation. For this, I splitted the example app (SigSpec.Console) into two apps. The spec generation and serialization part works okay, but when I try to deserialize the spec file back into a SigSpecDocument, a StackOverflowException occurs. Have you bumped a problem like this?

I am trying to generate the TS client from my Hub class. My intention is to separate the specification and the TS client generation. For this, I splitted the example app (SigSpec.Console) into two apps. The spec generation and serialization part works okay, but when I try to deserialize the spec file back into a SigSpecDocument, a StackOverflowException occurs. Have you bumped a problem like this?

I filed a PR fixing this issue (#19). Could you please review it? Thanks.

Interesting project, any chance the JSON can be modified and can be served by Swagger ?

Modified how?
Its a completely different spec than swagger so it would need its own ui etc.. see pr

I think this is a great project and would love it to be as easy as NSWAG is... a simple default UI would be great (appreciate this is not easy, just wanted to give support) ... do you have a crowdfunding project perhaps?

simple default UI

You mean a web UI like "Swagger UI" or the NSwagStudio UI? :-)
NSwag is a huge project - offering all of it for SigSpec would be a lot of work - and it's even more than NSwag as the "Swagger UI" part would be part of SigSpec...

(appreciate this is not easy, just wanted to give support) ... do you have a crowdfunding project perhaps?

Currently I do not actively develop it, main reason is that I do not use it - not for own projects and also not professionally... so it's quite hard to justify to work in it in my free time (and there is already a lot to do for NSwag/NJsonSchema which are much more used).

Sorry i wasn't clear. I would like it to output a webpage like Swagger ui so that my users can see the methods available on the signal r hub. I think for now I can use the json output to render something simple and effective.

Sure, i get that... feel there must be other people like me though so thought I would register my interest on here. Thanks

@dovjar started on such a UI: #41