Skip to content

Commit

Permalink
Add const for JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Apr 19, 2024
1 parent 7d7607f commit e7de55b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schemaregistry/serde/jsonschema/json_schema_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func getType(schema *jsonschema2.Schema) serde.FieldType {
if len(types) > 1 || len(schema.AllOf) > 0 || len(schema.AnyOf) > 0 || len(schema.OneOf) > 0 {
return serde.TypeCombined
}
if len(schema.Enum) > 0 {
if len(schema.Constant) > 0 || len(schema.Enum) > 0 {
return serde.TypeEnum
}
typ := types[0]
Expand Down

0 comments on commit e7de55b

Please sign in to comment.