SigSpec icon indicating copy to clipboard operation
SigSpec copied to clipboard

Discussion

Open RicoSuter opened this issue 7 years ago • 26 comments

RicoSuter avatar Oct 22 '17 16:10 RicoSuter

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?

Ppiwow avatar Jul 04 '18 08:07 Ppiwow

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

RicoSuter avatar Jul 04 '18 08:07 RicoSuter

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

RicoSuter avatar Jul 04 '18 09:07 RicoSuter

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

Ppiwow avatar Jul 04 '18 09:07 Ppiwow

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

Repsakk avatar Aug 09 '18 09:08 Repsakk

@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...

RicoSuter avatar Aug 09 '18 09:08 RicoSuter

I handled it.

Just need to generate json, save it somewhere and add it as endpoint. Not auto generated but still possible to display it in more human form

czw., 9 sie 2018 o 11:46 Rico Suter [email protected] napisał(a):

@Repsakk https://github.com/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...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/RSuter/SigSpec/issues/1#issuecomment-411701786, or mute the thread https://github.com/notifications/unsubscribe-auth/Am7o9bqOu4i2k8jXnKogyMu5Po7fx9xAks5uPAUKgaJpZM4QCADD .

-- Z poważaniem

Paweł Piwowarczyk

Ppiwow avatar Aug 09 '18 10:08 Ppiwow

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

RicoSuter avatar Aug 09 '18 11:08 RicoSuter

I know, but still really helpfull :)

Cheers

czw., 9 sie 2018 o 13:37 Rico Suter [email protected] napisał(a):

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RSuter/SigSpec/issues/1#issuecomment-411728160, or mute the thread https://github.com/notifications/unsubscribe-auth/Am7o9R5lxM-lk2IehBIclsTlHB_0-O7Eks5uPB70gaJpZM4QCADD .

-- Z poważaniem

Paweł Piwowarczyk

Ppiwow avatar Aug 09 '18 11:08 Ppiwow

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 avatar Mar 06 '19 10:03 Alamaster99

@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...

RicoSuter avatar Mar 06 '19 14:03 RicoSuter

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 avatar Mar 12 '19 03:03 bradygaster

@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...

RicoSuter avatar Mar 12 '19 07:03 RicoSuter

@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.

RicoSuter avatar Mar 12 '19 07:03 RicoSuter

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

austinsc avatar Mar 13 '19 10:03 austinsc

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 avatar Mar 15 '19 21:03 bradygaster

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

RicoSuter avatar Mar 15 '19 22:03 RicoSuter

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?

RicoSuter avatar Mar 15 '19 22:03 RicoSuter

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?

beorosz avatar Sep 09 '19 14:09 beorosz

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 (https://github.com/RicoSuter/SigSpec/pull/19). Could you please review it? Thanks.

beorosz avatar Sep 20 '19 18:09 beorosz

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

asadcr avatar Sep 06 '20 14:09 asadcr

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

RicoSuter avatar Sep 07 '20 10:09 RicoSuter

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?

Alex-Horlock avatar Jun 03 '21 13:06 Alex-Horlock

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).

RicoSuter avatar Jun 03 '21 13:06 RicoSuter

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

Alex-Horlock avatar Jun 03 '21 15:06 Alex-Horlock

@dovjar started on such a UI: https://github.com/RicoSuter/SigSpec/pull/41

RicoSuter avatar Jun 03 '21 17:06 RicoSuter