Skip to content

iancharters/oasrouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OASRouter Demo

Goals

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors