Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 985 Bytes

design.md

File metadata and controls

50 lines (44 loc) · 985 Bytes

Design

graph LR
    Yaml --> Spec --> Output[File]
Loading
type File struct {
    content []byte
    path    string
}

OpenAPI spec - Can tree representation

graph TD
    Spec --> Path
    Spec --> Components
    Components --> S1[Schemas] --> S1
    Path --> PathItem --> Operation
    Operation --> Parameters --> S3[Schemas] --> S3
    Operation --> Responses
    Operation --> RequestBody
    RequestBody --> MediaType
    Responses[Responses Container] -->  Response[Response $ref]
    Response --> RC[Content] --> MediaType --> S2[Schemas $ref] --> S2
Loading

Process Representation

graph LR 
    1[1. Unmarshal]
    2[2. ReadRefs] --- TT[Traverse Tree]
    3[3. Render] --- TT[Traverse Tree]
Loading

Spec is a Directed Acyclic Graph of composed nodes.

Can Package Structure

graph TD
    Can[main]
    Can --> Render
    Can --> Sanitize
    Can --> Server
    Can --> Model
    Can --> Route
    Can --> OpenAPI
Loading