我需要定义一个多次使用并更改参数的服务。我需要多次定义它,但每当我第二次定义它时,它会自动覆盖前一个。以下是我如何定义它。这是第一个定义:
/sevice :
post:
summary: Service ABC
description: |
This service is used to get ABC.
parameters:
- name: XYZ
in: query
description: '8'
required: true
type: number
format: integer
- name: LMN
in: query
description: '2'
required: true
type: number
format: integer
tags:
- ABC
responses:
'200':
description: An array of products
schema:
type: array
items:
$ref: '#/definitions/ABC'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
这是第二个定义:
/sevice :
post:
summary: Service ABC
description: |
This service is used to remove ABC.
parameters:
- in: body
name: jsonData
description: Object that needs to be sended to the store.
required: true
schema:
$ref: '#/definitions/PQR'
tags:
- ABC
responses:
'200':
description: An array of products
schema:
type: array
items:
$ref: '#/definitions/LMN'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
是否可以在一个 API 规范中多次出现相同的路径?