openapi - go-swagger 将数字注入属性名称
问题描述
我拥有的 models.yaml 文件是:
baseStorePatch:
title: Store
type: object
required:
- scalePolicy
properties:
scalePolicy:
$ref: "#/definitions/scalePolicy"
StorePatch:
allOf:
- $ref: "#/definitions/baseStorePatch"
- type: object
properties:
但是,当我使用 go-swagger 生成客户端时,输出为:
type StorePatch struct {
ScalePolicy *StorePatchAO0ScalePolicy `json:"scalePolicy,omitempty"`
}
为什么 go-swagger 会自动生成StorePatchAO0
前缀?以及如何摆脱它?
解决方案
推荐阅读
- r - 如何仅用图例绘制一个空的ggplot?
- mysql - Mysql 多对多选择和排序
- python - 如何在 Cygwin for Windows 10 (x64) 中使用 GDB 调试 python 源代码
- mongodb - 在 MongoDB 中使用 $function new 运算符进行 updateMany 失败
- javascript - 如何计算luxon中两个日期之间的持续时间?
- python - 为什么要使用什么都不做的抽象类?
- javascript - 通过 javascript 录制网站的内部音频
- django - Django覆盖保存方法,在更新模型上复制图像
- python-3.x - 断开特定用户与频道的连接
- reporting-services - 在 MS Teams 频道中的选项卡上显示 ssrs 报告