我有下面的YAML for swagger-codegen我希望它在两个独立的类中生成这个端点,默认情况下它会生成一个带有两个端点的api类,将它们标记为单独的api?用swager-codegen在不同的类中生成端点
/tenants:
post:
produces:
- application/json
consumes:
- application/json
parameters:
- name: body
in: body
required: true
schema:
$ref: "#/definitions/TenantRequest"
#################### User ####################
/tenants/{tenantId}/users:
post:
description: Create a User
produces:
- application/json
consumes:
- application/json
parameters:
- name: tenantId
in: path
required: true
type: string
- name: body
in: body
description: User object
required: true
schema:
$ref: "#/definitions/UserRequest"
这是在DefaultCodegen.java了'addOperationToGroup'方法在DefaultGeneratr.java通过'processOperation'方法调用的完成,如果你创建自己的客户端,您可以覆盖第一个把它们放到不同的工作组(并为此类)。但是,如果你想保持这些终点,我认为没有一种简单的方法。 – moondaisy