add decimals

This commit is contained in:
2023-04-23 22:16:37 +02:00
parent 774f27d97c
commit 8813fe1aa9
3 changed files with 11 additions and 80 deletions

View File

@ -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()