connexion icon indicating copy to clipboard operation
connexion copied to clipboard

fix: don't interpret simple parameter as deepObject

Open fgreinacher opened this issue 3 years ago • 3 comments

Fixes #1565

fgreinacher avatar Aug 02 '22 14:08 fgreinacher

@RobbeSneyders Here is my take on a fix. It works fine in our application:

$ http :8080/api "filter[surname]_bogus"=="greinacher"
HTTP/1.1 400 Bad Request
Content-Length: 235
Content-Type: application/vnd.api+json; charset=utf-8
Date: Tue, 02 Aug 2022 14:56:31 GMT

{
    "errors": [
        {
            "code": "xrn:err:core:invalidRequestParameter",
            "detail": "Extra query parameter(s) filter[surname]_bogus not in spec",
            "id": "a6a0b17e-e52f-37e4-a7d9-6c2e926ed4f8",
            "status": "400",
            "title": "Invalid Request Parameter"
        }
    ]
}

fgreinacher avatar Aug 02 '22 14:08 fgreinacher

Thanks @fgreinacher! I've submitted a PR to fix the failing tests due to a new Flask version: https://github.com/spec-first/connexion/pull/1572. I'd like to merge that one first. Feel free to review it.

RobbeSneyders avatar Aug 07 '22 21:08 RobbeSneyders

Thanks @fgreinacher! I've submitted a PR to fix the failing tests due to a new Flask version: #1572. I'd like to merge that one first. Feel free to review it.

Thanks @RobbeSneyders, I was wondering how this failure could be related to my change :)

The MR looks good to me!

fgreinacher avatar Aug 08 '22 08:08 fgreinacher

@RobbeSneyders I'm planning the last days before my summer vacation. Do you think we could get this in early next week so I can verify it with our services? 🙇

fgreinacher avatar Aug 12 '22 14:08 fgreinacher

Sorry for the delay, I was on vacation myself :) Should be good to go now. I'll prep a release.

RobbeSneyders avatar Aug 23 '22 07:08 RobbeSneyders