commercetools / commercetools/commercetools-api-reference
Add body for default ResourceNotFound error
- Lingua principale
- RAML
- Stelle
- 66
- Fork
- 33
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Currently in `api-specs/api/traits/errorable.raml` the 404 response is missing a body description. During code generation this causes the [Go code generator](https://github.com/commercetools/rmf-codegen/blob/main/languages/go/src/main/kotlin/io/vrap/codegen/languages/go/client/MethodRenderer.kt#L309) to skip generating a typed error for a ResourceNotFound response, defaulting to a GenericRequestError instead. I believe this happens because the 404 error gets filtered from the possible responses before being passed to the code generation method.
Would it be possible to add this body to the RAML definitions? Or do you maybe have other suggestions on how to deal with this type of missing body in described responses? I have tried hardcoding a 404 response in the code generation, but this conflicts with potential other raml definitions where there is a fully described 404.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia da api-specs/api/traits/errorable.raml e ispeziona la risposta 404 ResourceNotFound predefinita insieme a tutte le risposte 404 completamente descritte. Aggiungi la definizione di body mancante, quindi verifica che il generatore di codice Go non tratti più ResourceNotFound come GenericRequestError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100