修复部分场景确实min/max解析丢失的问题
This commit is contained in:
parent
0e1ceaf613
commit
58ba52f919
@ -601,6 +601,8 @@ func (g *Generate) AddComponentsSchema(rootSchemaName string, pkgPath string, in
|
|||||||
g.docData.Components.Schemas[schemaName].Properties[propertyName] = &define.Property{
|
g.docData.Components.Schemas[schemaName].Properties[propertyName] = &define.Property{
|
||||||
Type: convertBaseType,
|
Type: convertBaseType,
|
||||||
Format: inputType.Field(i).Type.String(),
|
Format: inputType.Field(i).Type.String(),
|
||||||
|
Maximum: ValidateRule.Maximum(inputType.Field(i)),
|
||||||
|
Minimum: ValidateRule.Minimum(inputType.Field(i)),
|
||||||
Default: ParseStructFieldTag.GetDefaultValue(inputType.Field(i)),
|
Default: ParseStructFieldTag.GetDefaultValue(inputType.Field(i)),
|
||||||
Description: ParseStructFieldTag.GetParamDesc(inputType.Field(i)),
|
Description: ParseStructFieldTag.GetParamDesc(inputType.Field(i)),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user