MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / genAPIs

Function genAPIs

mcp-server/openapi.go:68–82  ·  view source on GitHub ↗
(path string, item *openapi3.PathItem)

Source from the content-addressed store, hash-verified

66)
67
68func genAPIs(path string, item *openapi3.PathItem) ([]*API, error) {
69 apis := make([]*API, 0, 8)
70 for _, method := range validMethods {
71 opt := item.GetOperation(method)
72 if opt == nil {
73 continue
74 }
75 api, err := genAPI(method, path, opt, item.Parameters)
76 if err != nil {
77 return nil, err
78 }
79 apis = append(apis, api)
80 }
81 return apis, nil
82}
83
84func genAPI(method string, path string, opt *openapi3.Operation, params openapi3.Parameters) (*API, error) {
85 api := &API{

Callers 1

parseOpenAPI3Function · 0.85

Calls 1

genAPIFunction · 0.85

Tested by

no test coverage detected