问题描述
我希望Swagger Codegen在没有响应包装的情况下生成Delegate接口:
public interface MyApi {
MyApiDelegate getDelegate();
default ResponseEntity<NotificationEntity> httpGetUsingGET(...) {
...
}
这就是我希望生成的内容(请注意;没有ResponseEntity
包装器:
default NotificationEntity httpGetUsingGET(...)
这是输入的Swagger规范
'/api/notification/{encryptedId}':
get:
tags:
- Notifications
summary: Get a specific NotificationModel
operationId: httpGetUsingGET
produces:
- application/json
parameters:
- name: encryptedId
in: path
description: encryptedId
required: true
type: string
responses:
'200':
description: OK
schema:
$ref: '#/deFinitions/NotificationEntity'
我并不是不喜欢响应包装的想法。就是现有的代码库只返回没有包装的实体。
我正在使用SwaggerHub生成此文件,并将Spring Server Stub的responseWrapper
配置保留为空白。但我怀疑正在应用默认设置。我浏览了Swagger Codegen的源代码,找不到指定“ NONE”的方法。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)