swagger-api/swagger-codegen

undefined method build_from_hash in Enum data type

开放

#4,848 创建于 2017年2月24日

 (12 条评论) (2 个反应) (0 位负责人)HTML (5,474 个派生)batch import
Client: RubyFeature: EnumIssue: BugIssue: Workaround availablehelp wanted

仓库指标

星标
 (12,701 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Hi, Im having an issue. I am generating a json swagger into a ruby gem, the swagger JSOn contains Enum data type. The generated class that has an Enum data type does not have build_from_hash method so it always get NoMethodError. the convert_to_type method always call build_from_hash method

this is the convert_to_type method

screen shot 2017-02-24 at 9 09 23 pm

this is the AccountCategory class that has Enum data type

screen shot 2017-02-24 at 9 09 39 pm

can somebody help me?

贡献者指南