Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Request validation does not support nested query parameters #327

Open
@gburgett

Description

First, thank you so much for building an amazing library! It has helped us a lot in development of our new API, since we started with a documentation-driven approach. It allows us to ensure our implementation matches our spec. Please forgive me if this is a duplicate but I couldn't find it in your issue history.

We have some query parameters for an index operation that are defined as "filters" with a nested key for the attribute being filtered on. An example is GET /api/v1/events?filter[slug]=%2Ftest. Rack's Query Parser implementation turns the above into this params hash:

{
 "rack.request.query_string"=>"filter%5Bslug%5D=%2F",
 "rack.request.query_hash"=>{
 "filter"=>{
 "slug"=>"/test"
 }
 }
}

And then we get the following validation error:

#/paths/~1events/get missing required parameters: filter[slug]

Since it is a Rack specific behavior I didn't think this issue belonged in the openapi_parser library.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /