swagger-api/swagger-codegen

[R] Enums are not supported

オープン

#6,616 opened on 2017/10/03

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)HTML (5,474 件のフォーク)batch import
Client: REnhancement: FeatureFeature: Enumhelp wanted

Repository metrics

Stars
 (12,701 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド