You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+29
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,35 @@ Pass custom defined media type deserializers dictionary with supported mimetypes
177
177
178
178
result = validator.validate(request, response)
179
179
180
+
Formats
181
+
*******
182
+
183
+
OpenAPI defines a ``format`` keyword that hints at how a value should be interpreted, e.g. a ``string`` with the type ``date`` should conform to the RFC 3339 date format.
184
+
185
+
Openapi-core comes with a set of built-in formatters, but it's also possible to add support for custom formatters for `RequestValidator` and `ResponseValidator`.
186
+
187
+
Here's how you could add support for a ``usdate`` format that handles dates of the form MM/DD/YYYY:
0 commit comments