2
如何跳过从modelsEnum名称中删除通用前缀? 我有单值的枚举(今后我将有更多的值)和招摇代码生成插件与枚举代码代替AIRPORT_CODE生成类Swagger避免删除通用前缀
properties:
type:
enum: ["AIRPORT_CODE"]
description: the type of location that is identified by the value
你的问题就在这里https://github.com/swagger-api/swagger-codegen/blob/0ce6c7e3a8ad93c8c8a49b41b75a7f31561d75ce/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java# L3443,它似乎没有一种方法来改变这种行为而无需修改该方法(或在与您想要的语言对应的类中覆盖它)。你可能想为你的枚举选择一个格式,这个格式不会被'findCommonPrefixOfVars'方法捕获(如果可以的话)。 – moondaisy