我正在尝试使用Swagger Codegen » 2.2.1生成一些 Web 服务定义
所有配置都在工作,并且类是由我的.yaml
定义正确生成的。
为什么财产
basePath
被忽视了?
我只使用定义@RestController
生成:paths
https://springboot-base-save-return.appdes.xnet/saveBackendReturn
预期(使用basePath
和paths
定义):
https://springboot-base-save-return.appdes.xnet/v1/saveBackendReturn
我究竟做错了什么?我是不是忘记了什么?
我的.yaml
合同:
swagger: '2.0'
info:
description: My Project
version: 1.0.0
title: Save Backend Return
host: springboot-base-save-return.appdes.xnet
basePath: /v1
tags:
- name: saveBackendReturn
description: Save Backend Return
schemes:
- https
paths:
/saveBackendReturn:
post:
tags:
- saveBackendReturn
summary: Save Backend Return
description: My Project
operationId: saveBackendReturn
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: My Project
required: true
schema:
$ref: '#/definitions/saveBackendReturnRequest'
responses:
'200':
description: Ok
schema:
$ref: '#/definitions/saveBackendReturnResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
security:
- basicAuth: []