更新时间:2025-04-16 GMT+08:00
分享

Swagger脚本接口缺少operationId

问题现象

接口/sutservice/apis缺少“operationId”属性定义。

原因分析

Swagger 2.0文件:{fileName[swagger_error.json]-> yaml[/sutservice/apis]-> [get]接口下没有定义operationId}。

Swagger 3.0文件:/sutservice/apis中存在错误,operationId不能为null。

处理方法

接口/sutservice/apis缺少operationId属性定义,参考下图,增加operationId(唯一)定义。

图1 Swagger 2.0文件
图2 Swagger 3.0文件

相关文档