save code
This commit is contained in:
@@ -225,7 +225,7 @@ func generateSchemaRecursive(t reflect.Type, seen map[string]bool) *openapi3.Sch
|
||||
}
|
||||
return &openapi3.SchemaRef{
|
||||
Value: openapi3.NewObjectSchema().
|
||||
WithAdditionalProperties(valueSchema),
|
||||
WithAdditionalProperties(valueSchema.Value),
|
||||
}
|
||||
|
||||
case reflect.Ptr:
|
||||
@@ -253,11 +253,10 @@ func applyFieldInfoToSchema(schema *openapi3.Schema, info *StructFieldInfo) {
|
||||
if info.Example != nil {
|
||||
schema.Example = info.Example
|
||||
}
|
||||
if info.Min != nil {
|
||||
schema.Min = &openapi3.Min{Value: *info.Min}
|
||||
}
|
||||
schema.Min = info.Min
|
||||
|
||||
if info.Max != nil {
|
||||
schema.Max = &openapi3.Max{Value: *info.Max}
|
||||
schema.Max = info.Max
|
||||
}
|
||||
if info.MinLength != nil {
|
||||
schema.MinLength = *info.MinLength
|
||||
|
||||
Reference in New Issue
Block a user