You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to load /openapi/v1 in swagger ui, but this fails with an error message of endpoint only allows application/json or application/vnd.oai.openapi+json.
Swagger uses a GET request with an Accept header of application/json, */* which should be valid.
Manually trying it with application/json or */* works.
Looking at the code it seems that it tries to match the full header instead of treating it as a comma separated list.
Expected Outcome
It should return the openapi spec with a status code of 200
Actual Outcome
An error message of endpoint only allows application/json or application/vnd.oai.openapi+json with a status code of 400.
Environment
Clair version/image: 4.3.5
Clair client name/version: n/a
Host OS: n/a
Kernel (e.g. uname -a): n/a
Kubernetes version (use kubectl version): n/a
Network/Firewall setup: n/a
The text was updated successfully, but these errors were encountered:
hdonnay
added a commit
to hdonnay/clair
that referenced
this issue
Dec 1, 2021
This fixes the handling of the "accept" header to process lists and "q"
parameters properly, and moves it to a common helper function.
Closes: quay#1441
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
Description of Problem / Feature Request
I'm trying to load /openapi/v1 in swagger ui, but this fails with an error message of
endpoint only allows application/json or application/vnd.oai.openapi+json
.Swagger uses a GET request with an Accept header of
application/json, */*
which should be valid.Manually trying it with
application/json
or*/*
works.Looking at the code it seems that it tries to match the full header instead of treating it as a comma separated list.
Expected Outcome
It should return the openapi spec with a status code of 200
Actual Outcome
An error message of
endpoint only allows application/json or application/vnd.oai.openapi+json
with a status code of 400.Environment
uname -a
): n/akubectl version
): n/aThe text was updated successfully, but these errors were encountered: