gpt4 book ai didi

swagger - "bad indentation of mapping entry"错误在 Swagger Editor 中意味着什么?

转载 作者:行者123 更新时间:2023-12-02 17:02:58 25 4
gpt4 key购买 nike

我在以下 OpenAPI 定义的 Swagger 编辑器中收到“映射条目缩进错误”错误。谁能告诉我下面的代码有什么问题?

      responses:
'200':
description: List all applicable errors for API
headers:
x-request-received-at:
type: string
description: A datetime stamp of when the request was received
x-response-sent-at:
type: string
description: A datetime stamp of when the response was sent
schema:
$ref: '#/definitions/ErrorResponse'
default:
description: An unexpected error occurred
schema:
$ref: '#/definitions/Error'
'/funeral/{contractReference}/agreement':
get:
summary: Get the funeral policy and debit order mandate agreement for the client to sign
operationId:
- get801FuneralCoverPlanAgreementHtml
- getAUTHORITYANDMANDATEFORPAYMENTINSTRUCTIONSHTML
tags:
- "FuneralCoverService"
- "InternalAPI"
parameters:
- name: contractReference
in: "path"
required: true
type: string
description: "Unique contract reference linked to the quote and estimate prepared for the client which should be used as input to the agreements."
maxLength: 80

Swagger Editor: bad indentation of mapping entry error

最佳答案

参数属性未对齐。所有属性必须具有相同的缩进级别。

错误:

        parameters:
- name: contractReference
in: "path"
required: true
type: string
description: "Unique contract reference linked to the quote and estimate prepared for the client which should be used as input to the agreements."
maxLength: 80

正确:

        parameters:
- name: contractReference
in: "path"
required: true
type: string
description: "Unique contract reference linked to the quote and estimate prepared for the client which should be used as input to the agreements."
maxLength: 80

关于swagger - "bad indentation of mapping entry"错误在 Swagger Editor 中意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53155022/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com