-
I have a need for custom routes associated with authenticated users. I am going by the dynamic routing docs here I realize the caveats around complexity of dynamic route registration, but I don't have a better idea about how to handle this use case. I am open to other approaches. Meantime, I am trying to get dynamic routing working, and am struggling to get something working based on the provided example. Setting aside the need for authentication for a moment, here is what I have that seems to be about as close as I can get to the example in the docs:
Notes of comparison with the documented example:
The issue: Again, I am not bound to the idea of dynamic routes to solve my use case. I am open to any approach that allows me to serve up custom routes to specific users. Ideally, the customization would also be reflected appropriately in the OpenAPI docs as well, but I have not thought that far ahead yet. If there is not a better way to do this, I would appreciate any help in getting this dynamic route registration behavior working. I am also really interested in seeing this work with a class-based controller if that is possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I am realizing that there might be an answer here along the lines of: why not just specify a standard route with a vendor parameter like "/custom/{vendor:str}" or some such? So it might be worth walking through my process on getting here:
|
Beta Was this translation helpful? Give feedback.
-
Ok, I think what I was trying to do was way to complex and probably does not warrant further discussion. I have now completely changed tack. For what it is worth, just in case anyone is curious about implementing user specific customizations, this is the approach I am currently pursuing:
There will be some maintenance issues with being sure customers always have an up-to-date version of the main routes, but this is the cleanest approach I can come up with. It gives me the following capabilities:
Still feeling this out. Sorry to clutter up the discussion space. Do what you will with this thread -- I thought I had a particular question, but it turned out really to be the wrong question for my use case. |
Beta Was this translation helpful? Give feedback.
Ok, I think what I was trying to do was way to complex and probably does not warrant further discussion. I have now completely changed tack. For what it is worth, just in case anyone is curious about implementing user specific customizations, this is the approach I am currently pursuing: