- Generate models from spec.
- Validate OpenAPI spec on service start
- Parsable
- Valid example data
- Validate request
- On error
- Build a slice containing validation errors
- Provide a hook to allow the consumer to modify the errors into their own shape (Google BadRequest, JSON:API, etc).
- On success
- Unmarshal body into the generated struct
- Unmarshal query params into struct
- Provide a hook to allow the consumer to modify the error on failure of 1 or 2
- On error
- Validate Response
- The response should match the schema
- On error
- Build a slice containing validation errors
- Provide a hook to allow the consumer to log and alert.
- On error
- The response should match the schema
iancharters/oasrouter
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|