Swagger: Representing enum property in hash error
问题 I am currently working on a Swagger documentation for Ruby on Rails API. The API has lots of enumerators (enums) which are included in various models. The enums are stored as hashes and not arrays in the app/models/concerns directory so that they can be modified without issues later. State Enum (state.rb) module State extend ActiveSupport::Concern included do enum state: { state1: 'State 1', state2: 'State 2', state3: 'State 3', state4: 'State 4', state5: 'State 5' } end end However, when I