Open yieio opened 2 years ago
RT,OAS3的OpenApi 枚举会生成成 Class类型
Pont 版本1.3.3
{ "openapi": "3.0.1", "info": { "title": "框架API", "version": "v1" }, "paths": { }, "components": { "schemas": { "AjaxResultType": { "enum": [ "Success", "Info", "UnAuth", "Forbidden", "NoFound", "Locked", "Error" ], "type": "string" } }, "securitySchemes": { "oauth2": { "type": "apiKey", "description": "请输入带有Bearer的Token,形如 “Bearer {Token}” ", "name": "Authorization", "in": "header" } } }, "security": [ { "oauth2": [ "readAccess", "writeAccess" ] } ] }
生成的baseClass内容:
class AjaxResultType {}
enum AjaxResultType { Success, Info = "Info", UnAuth = "UnAuth", Forbidden = "Forbidden", NoFound = "NoFound", Locked = "Locked", Error = "Error" }
目前支持 swagger2和swagger3。 https://github.com/alibaba/pont/pull/339 这个mr已支持自定义解析数据源,等待合并后新版发布。
What happens(发生了什么)?
RT,OAS3的OpenApi 枚举会生成成 Class类型
接口 json
生成的baseClass内容:
class AjaxResultType {}
希望能生成