Skip to content
Discussion options

You must be logged in to vote

well, it's not possible, @shadone
And frankly I'm not sure it should be. I'd advocate for single purpose routes.
From what I see, you want that endpoint either to process the given file or to take that file from a given url.
But you also want different response for those cases.
In this regard, I suggest you to make 2 routes for those requests (not to combine them), but to extract the actual data processing to a function that you could call from the handlers of both endpoints.
In the end, each would have its own input and output schema, but you won't repeat yourself in common parts.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@shadone
Comment options

@RobinTail
Comment options

@RobinTail
Comment options

@shadone
Comment options

@RobinTail
Comment options

Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants