swagger-api/swagger-codegen

[Go] Generated client code doesn't return specified error objects for non-2xx response codes

Open

#2296 aperta il 2 mar 2016

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)HTML (5474 fork)batch import
Client: GoEnhancement: Generalhelp wanted

Metriche repository

Star
 (12.701 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Currently the generated code (DefaultApi) does return an error code if a non-2xx HTTP condition occurs (ie an error), but it ignores what the swagger says it should produce. E.g. if the swagger states that a 404 returns a petNotFoundError object, currently the Go code generator ignores this fact.

Guida contributor