Documentation
¶
Overview ¶
Package openapi loads OpenAPI 3.x specs and maps them into Synapse graph IR.
Index ¶
- func ListSpecFiles(root string, ignoreDirNames []string) ([]string, error)
- func Load(path string) (*openapi3.T, error)
- func LoadBytes(data []byte) (*openapi3.T, error)
- func LooksLikeOpenAPI(data []byte) bool
- func OperationID(specPath, method, path string) graph.NodeID
- func OperationSymbol(method, path string) string
- func ParseFile(absPath, relPath string) (parse.Result, error)
- func SchemaID(specPath, name string) graph.NodeID
- func ToResult(specPath string, doc *openapi3.T) parse.Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListSpecFiles ¶
ListSpecFiles walks root and returns absolute paths of OpenAPI 3.x docs. Directories named in ignoreDirNames are skipped (defaults match parse.DefaultIgnoreDirNames).
func LooksLikeOpenAPI ¶
LooksLikeOpenAPI reports whether data appears to be an OpenAPI 3.x document.
func OperationID ¶
OperationID builds a Phase-1 node id for an operation.
func OperationSymbol ¶
OperationSymbol is the URI/legacy symbol for an HTTP operation (e.g. "GET /users").
func ParseFile ¶
ParseFile loads path and returns graph IR. Relative path is used as Node.Path when relPath is non-empty; otherwise filepath.Base of path is used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.