带有 openapi-generator-cli typescript-fetch 的 OpenAPI 3.1:JsonParseException:无法识别的令牌 'openapi':期待(JSON 字符串,...)

OpenAPI 3.1 with openapi-generator-cli typescript-fetch: JsonParseException: Unrecognized token 'openapi': was expecting (JSON String, ...)

我想使用 openapi-generator-cli 生成一个 typescript-fetch 客户端。规范由 Stoplight 使用 OpenAPI 3.1 格式生成。但是当我 运行 命令

openapi-generator-cli generate -i resources/openapi/Attribute.yaml -o ../test/ -g typescript-fetch

我收到错误

[ERROR] i.s.parser.SwaggerCompatConverter - failed to read resource listing
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'openapi': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (String)"openapi: 3.1.0 ... ] 

使用另一个 openapi 代码生成器 (openapi-typescript-codegen) 我可以毫无问题地生成客户端代码,因此规范不仅经过验证而且可用。这让人怀疑问题出在 OpenAPI 版本上。

openapi-typescript-codegen 是否支持 OpenAPI 3.1,或者我可以做些什么来调整我的规范文件?

我正在使用

Swagger 和其他工具(包括 openapi-generator-cli)尚不支持 OpenAPI 3.1,这就是错误的原因。

这是最后一个(重要的)update,团队仍在努力。