小编tba*_*tch的帖子

openAPI 无法解析对外部文件的引用。组件名称包含无效字符

我试图将一个大的 yml 分成一堆较小的 yml 文档。我按照David Garcia 提供的示例进行操作,然后使用 OpenAPI CodeGenerator 生成我的模型。OpenAPI Generator 抱怨[BUG] attribute components.schemas.Schema name doesn't adhere to regular expression ^[a-zA-Z0-9.-_]+$. 因此,我尝试通过克隆 David Garcia 的存储库并在本地部署来使用 David Garcia 的示例,但我遇到了相同的错误。我决定在swagger editor中检查它,我遇到了同样的问题,但错误消息显示

Semantic error at components.schemas.$ref
Component names can only contain the characters A-Z a-z 0-9 - . _
Jump to line 25
Run Code Online (Sandbox Code Playgroud)

我正在使用 David Garcia 示例中的 yaml:

Semantic error at components.schemas.$ref
Component names can only contain the characters A-Z a-z 0-9 - . _
Jump to …
Run Code Online (Sandbox Code Playgroud)

json yaml openapi openapi-generator

3
推荐指数
1
解决办法
4307
查看次数

标签 统计

json ×1

openapi ×1

openapi-generator ×1

yaml ×1