Skip to content
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

Integrate with new Endpoint Routing API #1

Open
dustinmoris opened this issue Dec 20, 2018 · 13 comments
Open

Integrate with new Endpoint Routing API #1

dustinmoris opened this issue Dec 20, 2018 · 13 comments

Comments

@dustinmoris
Copy link
Member

See: giraffe-fsharp/Giraffe#310

@Dzoukr
Copy link

Dzoukr commented Oct 8, 2019

Hi @dustinmoris,

just a quick question. Since dotnet core 3 is released, does it somehow change anything regarding generating Swagger/OpenAPI documentation? As far as I understand, it should be now possible to extract routes (end return types) even for apps not based on MVC routing. Correct? I think this feature would be great for all F# people (I am sick of writing yaml by hand 😄) so do you have any plan how to approach it? Need any help with it?

@gerardtoconnor
Copy link
Member

gerardtoconnor commented Oct 8, 2019

Hi @Dzoukr ,

Swashbuckle (Swagger middleware on aspnet core) will hopefully utilise endpoint routing so we (@dustinmoris ) are in the process of integrating new Endpoint routing system as an initial step here. Once we have endpoint routing in, we should be able to hook in Swashbuckle middleware to generate swagger docs.

One Item that still needs investigation is the swagger override attributes to customise the response although basic docs should come back fine and all this will be tested once Endpoint routing integrated.

@slang25
Copy link
Member

slang25 commented Oct 8, 2019

@gerardtoconnor I don't think Swashbuckle does integrate with Endpoint Routing though, do you have a source for that?

My understanding is that we are hoping that there will be an emerging need for Endpoint Routing to work with Swashbuckle or a similar tool, but that isn't currently being built, I can't even find an issue for it.

@Dzoukr
Copy link

Dzoukr commented Oct 8, 2019

Hi @gerardtoconnor, thanks a lot for explanation!

@dustinmoris
Copy link
Member Author

@slang25 domaindrivendev/Swashbuckle.AspNetCore#1306

@WalternativE
Copy link

I think the NSwag contributors are having similar discussions regarding the switch to use the endpoint collection. There seems to be no concrete effort tough. This is the only issue I could find RicoSuter/NSwag#2101

@slang25
Copy link
Member

slang25 commented Oct 8, 2019

@dustinmoris @WalternativE Thanks both 😃 I'll do some digging and try to figure out what's involved.

@gerardtoconnor
Copy link
Member

@slang25 yes you're absolutely right, I thought our motivation for integrating endpoint routing was to allow for this support automatically as was almost there, looking through the docs and code, there is still the dependency on MVC and the plans to use endpoint routing are still only in the design/discussion phase so will be a while still ... makes me think I should perhaps integrate into Token Router in the interim or something to give some sort of automation to this heavily requested feature.

@Freymaurer
Copy link

Hello everyone, i hope this is the correct place to ask. I am a trying to integrate Swashbuckle into a SAFE stack application and spend the last few days reading about the big changes for aspnetcore 3 and how endpoint routing will make the interaction of giraffe and swashbuckle possible, but... i have not found any posted solutions or examples for this online, so as i am a bit out of the loop, my questions are:

Did aspnetcore 3.0 enable swashbuckle for giraffe?
Did swashbuckle adapt to this accordingly?

I found an example for endpoint routing in #4 but i don't know if this version is possible to use in a SAFE stack or if it works with swashbuckle so i wanted to ask first.

Sorry if my question is stupid and thanks for any answers.

@dustinmoris
Copy link
Member Author

Hi, ASP.NET Core 3.0 doesn't enable Swashbuckle for Giraffe yet. We still need to do some extra work. We were hoping that the new endpoint routing could hugely simplify this task, but it seems like there's still quite some work left on the Giraffe front. Please check this thread for more information:
giraffe-fsharp/Giraffe#428

@jkone27
Copy link

jkone27 commented Oct 21, 2021

any good news on this end?

@slang25
Copy link
Member

slang25 commented Oct 21, 2021

This was pretty promising and worth a look at: https://github.com/baronfel/Giraffe.EndpointRouting.OpenAPI

@dustinmoris
Copy link
Member Author

Just as an update, I admittedly don't have the time at the moment to really do any meaningful work on this front but I'm always open and very welcoming of community contributions.

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

No branches or pull requests

7 participants