Skip to content

Commit

Permalink
encoding/jsonschema: remove space in date-time format name
Browse files Browse the repository at this point in the history
This space was not intended to be present!

Fixes #3454.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I1f8cce1a2237403560e11d5467ec1e240206908b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201352
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
  • Loading branch information
rogpeppe committed Sep 17, 2024
1 parent e90555f commit f7462ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion encoding/jsonschema/constraints_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var formatFuncs = sync.OnceValue(func() map[string]formatFuncInfo {
"byte": {openAPI, formatTODO},
"data": {openAPI, formatTODO},
"date": {vfrom(VersionDraft7), formatTODO},
"date-time ": {allVersions | openAPI, formatTODO},
"date-time": {allVersions | openAPI, formatTODO},
"double": {openAPI, formatTODO},
"duration": {vfrom(VersionDraft2019_09), formatTODO},
"email": {allVersions | openAPI, formatTODO},
Expand Down
4 changes: 1 addition & 3 deletions encoding/jsonschema/testdata/txtar/openapi_date-time.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ components:
format: date-time

-- out/decode/extract --
ERROR:
unknown format "date-time":
schema.yaml:5:9
#DateTime: string

0 comments on commit f7462ee

Please sign in to comment.