gpt4 book ai didi

java - 生成SDK时发生内部错误

转载 作者:行者123 更新时间:2023-11-30 02:29:32 25 4
gpt4 key购买 nike

我使用 AWS API Gateway 用户界面创建了一个简单的 API(下面导出了 swagger):

swagger: "2.0"
info:
version: "2017-06-15T21:29:34Z"
title: "Clone from OTAUpdate"
host: "3ks9wfuui3.execute-api.us-east-2.amazonaws.com"
basePath: "/test"
schemes:
- "https"
paths:
/users:
post:
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "CreateUserRequest"
required: true
schema:
$ref: "#/definitions/CreateUserRequest"
responses:
200:
description: "200 response"
400:
description: "400 response"
500:
description: "500 response"
definitions:
CreateUserRequest:
type: "object"
required:
- "emailAddress"
- "password"
properties:
emailAddress:
type: "string"
description: "email address of the user"
password:
type: "string"
description: "password of the user"
title: "CreateUserRequest"

当我部署 API 时,我可以生成除 Java 之外的所有 SDK。当我尝试生成 Java SDK 时,收到一条错误消息:

Internal error occurred while generating SDK

我做错了什么?

最佳答案

经过一段时间的思考,我成功地找出了这个问题的原因。在我的“模型”描述中,包括

"additionalProperties": false

直接导致了问题,而删除该行解决了问题。

经过一番谷歌搜索后,这似乎是 API 网关服务中当前 Unresolved 错误: https://forums.aws.amazon.com/thread.jspa?threadID=223666

关于java - 生成SDK时发生内部错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44577423/

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