-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hello,
SWAG/OpenAPI specification has parameter attribute called format which can be used to specify acceptable format for given type. For example one can specify following:
schema:
type: object
properties:
startDate:
type: string
format: date
where date could be an RFC3339 date ("yyyy-mm-dd"). This specification can (and should) be used for validation before passing data to underlying handler. Another examples are URL, email, phone number or zip code. These formats need special attention because they may have different format for different countries (or API requirements), therefore there should be ability to specify validator for format in addition to some standard validators (for formats defined in OpenAPI specification).
Metadata
Metadata
Assignees
Labels
No labels