MCPcopy Index your code
hub / github.com/github/docs / getFlatListOfOperations

Function getFlatListOfOperations

tests/unit/openapi-schema.js:13–29  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

11const schemasPath = 'src/rest/data'
12
13async function getFlatListOfOperations(version) {
14 const flatList = []
15
16 if (isApiVersioned(version)) {
17 const apiVersions = allVersions[version].apiVersions
18
19 for (const apiVersion of apiVersions) {
20 const operations = await getRest(version, apiVersion)
21 flatList.push(...createCategoryList(operations))
22 }
23 } else {
24 const operations = await getRest(version)
25 flatList.push(...createCategoryList(operations))
26 }
27
28 return flatList
29}
30
31function createCategoryList(operations) {
32 const catSubCatList = []

Callers 2

openapi-schema.jsFile · 0.85
findOperationFunction · 0.85

Calls 3

isApiVersionedFunction · 0.90
getRestFunction · 0.85
createCategoryListFunction · 0.85

Tested by

no test coverage detected