我的招摇的JSON中包含以下代码段:
"securityDefinitions": {
"oauth2schema": {
"type": "oauth2",
"authorizationUrl": "http://localhost:9999/sso/login",
"flow": "implicit",
"scopes": {
"write": "Allows writing".
}
}
}
是否有一种使用swagger-codegen-maven-plugin
的方式将其生成为对象,更具体地说是要生成的作用域?我正在使用插件的2.4.10
版本。
答案 0 :(得分:0)
您可以使用自定义模板(CLI选项-t
)创建一个Security
类,将各种属性存储在securityDefinitions
中。