swagger-api/swagger-codegen

[R] Enums are not supported

Open

#6,616 创建于 2017年10月3日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)HTML (5,474 fork)batch import
Client: REnhancement: FeatureFeature: Enumhelp wanted

仓库指标

Star
 (12,701 star)
PR 合并指标
 (30 天内没有已合并 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

贡献者指南