swagger-api/swagger-codegen

[R] Enums are not supported

開放

#6,616 建立於 2017年10月3日

 (3 則留言) (0 個反應) (0 位負責人)HTML (5,474 個分叉)batch import
Client: REnhancement: FeatureFeature: Enumhelp wanted

倉庫指標

星標
 (12,701 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Models that are enum classes are not being generated correctly, they are missing allowable values from the swagger specs.

How should enums be implemented since R doesn't support it?

Here's one solution: enumClass <- R6::R6Class( 'ElevationLevel', type1 = "TYPE_1", type2 = "TYPE_2", type3 = "TYPE_3", value = NULL public = list( initialize = function(value){ self$value <- value } ) )

@ramnov @wing328

貢獻者指南