Skip to content

bind: map OpenAPI date-time format tags to RFC3339 - #3108

Open
team-humaki wants to merge 1 commit into
labstack:masterfrom
team-humaki:bind-openapi-datetime-format
Open

team-humaki wants to merge 1 commit into
labstack:masterfrom
team-humaki:bind-openapi-datetime-format

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #3107

swag and OpenAPI use format:"date-time" (and date-time-local) on fields. Echo treated that tag as a Go reference-time layout, so time.Parse("date-time", ...) failed and binding broke those structs.

Map those two OpenAPI format names to RFC3339. Other format values stay Go layouts (2006-01-02, 2006-01-02T15:04, …).

go test . ./middleware green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

format tag conflicts with swag

1 participant