-
Notifications
You must be signed in to change notification settings - Fork 853
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
View routes at runtime ala OpenAPI/Swagger #1107
Comments
We do have these ConfigureEndpoint callbacks that would let you add metadata to routes.
@halter73 what would we need to add to routes for Swagger light up? That said, I'd expect a swagger doc for the proxy routes to be misleading since they usually include wildcards that map to multiple routes on the destination system? |
I agree it's not perfect and would be open to anything that makes sense. Even just an option to spit back out a sanitized serialized config at runtime for some basics would work. Swagger seemed like it might be close enough, but yes, it might be misleading. |
@amweiss - can we step back a moment. What are you trying to accomplish here? Do you need swagger as the output format, or is what you are looking for a way to get a dumping of the route table?
Unless you are extremely specific in your route definitions, YARP is not going to know much about the endpoints for your app(s). So getting a dumping of the routes is not going to tell you what the API names and parameters are. You will really only get that information from the destination servers. Depending on how you have configured the URL transformation in YARP - you may need to transform the data from swashbuckle for the destinations. If its using relative URLs then you should be able to set the |
@samsp-msft the request was:
So all I'm looking for is a way to view the routes at runtime over http. This could be combined with our service swagger to allow for developers to know how to reach the endpoints they want to call. |
Duplicate of #124 |
What should we add or change to make your life better?
Add a way to hook in something like https://github.com/domaindrivendev/Swashbuckle.AspNetCore to produce a consumable view of the routes at runtime.
It seems like if there's a way to expose the configured routes to
ApiExplorer
, the above package might just work?Why is this important to you?
This would allow us to produce API documentation that can link to the connected systems including the route through YARP to use to access them.
The text was updated successfully, but these errors were encountered: