Wildcard content-type "*/*" leads to unparsed JSON responses
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
The bug is that a response declared with the wildcard content-type */* is not parsed, so an object schema fails against a String body. Start where the response parser is chosen from the OAD's response content-type, and check how the wildcard is handled there. Done means a */* response with type: object gets its body parsed and validates. The issue has been open for about a year with one comment and no answer, so confirm the expected behaviour with the maintainer first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Currently openapi_first picks a response parser based on the content-type defined in your OAD. If you specify a content-type like application/json: your response will be parsed with JSON.
When your OAD has a response content-type specified like */* openapi_first current does not parse the response body at all and just returns the plain body (as a String).
This leads to having a response definition like this always failing validation, because a the string (String) is not an object (Hash):
content:
"*/*":
schema:
type: object
- Lingua principale
- Ruby
- Stelle
- 222
- Fork
- 27
- Merge medio
- 17h 15m
- PR unite (30g)
- 6
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ahx/openapi_first
-
Multipart file uploads fail validation with ActionDispatch::Request (UploadedFile isn't a Hash)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ahx/openapi_first#516 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
ahx/openapi_first#484 · 4 commenti · 1 reazione ·
-
OpenAPI 3.2 supportForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
ahx/openapi_first#469 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ahx/openapi_first#458 · 4 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
ahx/openapi_first#425 ·
Tutte le issue di ahx/openapi_first
Issue simili
-
Bug Ruby
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-ruby#3211 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
internetee/registry#2984 ·
I maintainer di solito rispondono entro 6 giorni
-
interest-zsv
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
hitobito/hitobito_zsv#6 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ecosyste-ms/issues#862 ·
I maintainer di solito rispondono entro 1 giorno
-
Redis Lua error `@user_script:52: ERR value is not an integer or out of range` when `window_size` is configuredForse già presa @mimosa l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno