MCPcopy
hub / github.com/github/docs / decorate

Function decorate

src/rest/scripts/utils/decorator.js:16–23  ·  view source on GitHub ↗
(schemas)

Source from the content-addressed store, hash-verified

14const REST_DEREFERENCED_DIR = 'src/rest/data/dereferenced'
15
16export async function decorate(schemas) {
17 console.log('\n🎄 Decorating the OpenAPI schema files in src/rest/data/dereferenced.\n')
18 const { restSchemas, webhookSchemas } = await getOpenApiSchemaFiles(schemas)
19 const webhookOperations = await getWebhookOperations(webhookSchemas)
20 await createStaticWebhookFiles(webhookOperations)
21 const restOperations = await getRestOperations(restSchemas)
22 await createStaticRestFiles(restOperations)
23}
24
25async function getRestOperations(restSchemas) {
26 console.log('\n⏭️ Start generating static REST files\n')

Callers 1

mainFunction · 0.90

Calls 5

getOpenApiSchemaFilesFunction · 0.85
getWebhookOperationsFunction · 0.85
createStaticWebhookFilesFunction · 0.85
getRestOperationsFunction · 0.85
createStaticRestFilesFunction · 0.85

Tested by

no test coverage detected