add decimals
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/shopspring/decimal"
|
||||
|
||||
"git.ma-al.com/goc_marek/fiber_docs/constants"
|
||||
"git.ma-al.com/goc_marek/fiber_docs/router"
|
||||
@ -94,7 +95,7 @@ func (swagger *Swagger) getSchemaByType(t interface{}, request bool) *openapi3.S
|
||||
schema = openapi3.NewDateTimeSchema()
|
||||
case uuid.UUID, *uuid.UUID:
|
||||
schema = openapi3.NewUUIDSchema()
|
||||
case float32, float64, *float32, *float64:
|
||||
case float32, float64, *float32, *float64, decimal.Decimal, *decimal.Decimal:
|
||||
schema = openapi3.NewFloat64Schema()
|
||||
case bool, *bool:
|
||||
schema = openapi3.NewBoolSchema()
|
||||
|
Reference in New Issue
Block a user