* Add custom media type info and update subsection cross-refs * Update the permissions for GH Apps page * Add temporary JSON files Replace these with the autogenerated ones from github/github, when the associated PR over there is merged. * Change json+sarif to sarif+json * Condition media types section This new section will only become accurate in GHES 3.1 * Add temporary copies of decorated & dereferenced files * Add new endpoints to the permissions page /rest/reference/permissions-required-for-github-apps * Update temp JSON files * Update JSON files * Add github-ae: '*' * Add github-ae: '*' * Add github-ae: '*' * Update content/rest/reference/code-scanning.md * Update JSON files * Update content/github/finding-security-vulnerabilities-and-errors-in-your-code/sarif-support-for-code-scanning.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> * Update content/github/finding-security-vulnerabilities-and-errors-in-your-code/uploading-a-sarif-file-to-github.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> * Update content/rest/reference/code-scanning.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> * Update content/rest/reference/code-scanning.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> * Update content/rest/reference/permissions-required-for-github-apps.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> * Make review comment changes * Remove development mode JSON files * Update OpenAPI Descriptions (#17857) * Update OpenAPI Descriptions * Add decorated OpenAPI schema files * Remove development mode JSON files * Update OpenAPI JSON files (#17869) * Update OpenAPI Descriptions * Add decorated OpenAPI schema files Co-authored-by: github-openapi-bot <security+github-openapi-bot@github.com> * Remove development mode JSON files * Update OpenAPI Descriptions (#17863) * Update OpenAPI Descriptions * Add decorated OpenAPI schema files * Update content/rest/reference/permissions-required-for-github-apps.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> * Update content/rest/reference/permissions-required-for-github-apps.md * Update content/rest/reference/permissions-required-for-github-apps.md * Update content/rest/reference/permissions-required-for-github-apps.md * Update content/rest/reference/permissions-required-for-github-apps.md * Update content/rest/reference/code-scanning.md Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com> Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com> Co-authored-by: github-openapi-bot <security+github-openapi-bot@github.com>
REST
About this directory
lib/rest/index.jsis human-editable.lib/rest/static/*.jsonare generated by scripts.
Editable files
lib/rest/index.jsconsumes the static decorated schema files and exportscategories,operations, andoperationsEnabledForGitHubAppsused by the REST middleware contextualizer.
Static files
Generated by script/rest/update-files.js:
lib/rest/static/dereferenced- dereferenced OpenAPI schema file for each version of GitHublib/rest/static/decorated- files generated from the dereferenced OpenAPI schema with the Markdown descriptions rendered in HTML
Rendering docs
When the server starts, middleware/contextualizers/rest.js accesses the data exported from the static decorated JSON files, fetches the data for the current version and requested path, and adds it to the context object. The added property is:
req.context.currentRestOperations- all operations with a category matching the current path
Markdown files in content/rest/reference use Liquid to loop over these context properties. The Liquid calls HTML files in the includes directory to do most of the rendering. Writers can add content to the Markdown files alongside the Liquid.