We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0bb99b commit dada8daCopy full SHA for dada8da
styleparam.go
@@ -27,6 +27,7 @@ import (
27
"time"
28
29
"github.com/deepmap/oapi-codegen/pkg/types"
30
+ "github.com/google/uuid"
31
)
32
33
// Parameter escaping works differently based on where a header is found
@@ -428,6 +429,10 @@ func primitiveToString(value interface{}) (string, error) {
428
429
case reflect.Struct:
430
// If input has Marshaler, such as object has Additional Property or AnyOf,
431
// We use this Marshaler and convert into interface{} before styling.
432
+ if v, ok := value.(uuid.UUID); ok {
433
+ output = v.String()
434
+ break
435
+ }
436
if m, ok := value.(json.Marshaler); ok {
437
buf, err := m.MarshalJSON()
438
if err != nil {
0 commit comments