cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger open API - date-time pattern is allowing yyyy value

Highlighted
Visitor

Swagger open API - date-time pattern is allowing yyyy value

Swagger 3.0 by default validating against pattern ^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)*$ for given date-time field in swagger but its allowing just year without error

{ "date":"2020" - allowing this value }

date = 2020-06-16T13:22:01.Z - validating this value properly but allowing just year where it need to restrict as per RFC3339 date-time pattern.

Is this bug in swagger or some jar wrongly validating the date ?
Tags (2)
New Here?
Join us and watch the welcome video:
Announcements