swagger-api/swagger-codegen
在 GitHub 查看[Go] Generated client code doesn't return specified error objects for non-2xx response codes
Open
#2,296 创建于 2016年3月2日
Client: GoEnhancement: Generalhelp wanted
仓库指标
- Star
- (12,701 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
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.