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

In poem_openapi, allow a Query to have additional parameters #787

Open
miniluz opened this issue Mar 30, 2024 · 2 comments
Open

In poem_openapi, allow a Query to have additional parameters #787

miniluz opened this issue Mar 30, 2024 · 2 comments
Labels
question Further information is requested

Comments

@miniluz
Copy link

miniluz commented Mar 30, 2024

I'm trying to implement an OAuth 2.0 compliant authorization server, and for one of the endpoints you should return a 308 permanent redirect to an URL with the same query that was sent in (maybe changing the values of a few of them).

Is there an "additional parameters" option for a Query or a way to get those additional parameters? Is there a way to make Query reject queries that have repeated keys? Is there a way to turn the query into a String?

I'm assuming not, and that I'd need to make a new query struct myself. Would this be possible at all? What traits would I need to implement for it to be usable in place of poem_api::param::Query (or poem::web::Query)?

@miniluz miniluz added the question Further information is requested label Mar 30, 2024
@miniluz
Copy link
Author

miniluz commented Mar 30, 2024

I have figured out a lot. I'm pretty sure those options don't exist, and I'd just need to write a parser myself and implement a method to turn it into a string.

@miniluz
Copy link
Author

miniluz commented Mar 30, 2024

How could I make sure that it was still is all documented under OpenAPI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant