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

How to reject unknown query params? #342

Closed
banool opened this issue Jul 26, 2022 · 3 comments
Closed

How to reject unknown query params? #342

banool opened this issue Jul 26, 2022 · 3 comments
Labels
question Further information is requested Stale

Comments

@banool
Copy link
Contributor

banool commented Jul 26, 2022

Hey, I see in Poem there is deny_unknown_fields for when deserializing objects. I wonder if there is a similar thing for query params. For example, if I have a function like this:

    async fn get_account_modules(
        &self,
        accept: Accept,
        address: Path<Address>,
        ledger_version: Query<Option<U64>>,
    )

I want it that if someone sends a request like ?version=54 instead of ?ledger_version=54, it returns a 400.

Thanks!

@banool banool added the question Further information is requested label Jul 26, 2022
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Aug 26, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@banool
Copy link
Contributor Author

banool commented Sep 9, 2022

@sunli829 could we re-open this one and add a "do not mark stale" tag? I think it's a legit feature request.

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

No branches or pull requests

1 participant