commercetools / commercetools-api-reference

commercetools API reference documentation
http://docs.commercetools.com/
57 stars 27 forks source link

Add body for default ResourceNotFound error #285

Open demeyerthom opened 11 months ago

demeyerthom commented 11 months ago

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 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.