Skip to content

Commit a517d43

Browse files
committed
fixes
1 parent a4da8ff commit a517d43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apidef/oas/validator.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,9 @@ type schemaModifier struct {
289289
}
290290

291291
func (c *schemaModifier) cacheKey() string {
292-
allowedFields := slices.SortedFunc(slices.Values(c.allowedFields), strings.Compare)
293-
return fmt.Sprintf("%s:%#v", c.version, allowedFields)
292+
allowedFields := slices.Clone(c.allowedFields)
293+
slices.SortFunc(allowedFields, strings.Compare)
294+
return c.version + ":" + strings.Join(allowedFields, ":")
294295
}
295296

296297
func (c *schemaModifier) getSchema() ([]byte, error) {

0 commit comments

Comments
 (0)