1
0
mirror of synced 2026-01-06 15:01:04 -05:00
Files
docs/lib/rest
jmarlena 0a4f3e7dab Self-serve package deletion and restoration (#17695)
* New article title & reposition article

* Update links

* Remove "Deleting a container image" article

* Reusable shuffle

* Add GHES versioned article

* more context

* Revise main article

* Reminder of permissions

* Update some copy

* Add "deleting a package" to TOC

* Add versioning around links

* Update restore package procedure

* Update permissions statements

* Fix GHES link

* Apply suggestions from code review

Co-authored-by: Martin Lopes <martin389@github.com>

* Use "entire" language

* GraphQL nuance

* New intro + actions

* Fix GHES link

* Package deletion 2.0 follow up (#17855)

* Remove GHES 3.1 versioning

* 3.0 or less

* Revert "Remove GHES 3.1 versioning"

This reverts commit 9bbc0bd57c1c7ba23097f3f4b9a830c13941402c.

* Revert "3.0 or less"

This reverts commit dfd2f48e4a4da62c2594fbeaeb12eacda5afc6d4.

* Revert "Revert "Remove GHES 3.1 versioning""

This reverts commit ef90065eb2883041b15bd2d50f97e4f07cf04768.

* Ditch unnecessary package namespace references and rework permissions framing

* Add placeholder note so PR tests will pass

* Add versioning around package deletion mentions outside of main deletion articles

* Add placeholder around link so it will go live

* Add `audit_log` entries

* Apply suggestions from code review

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* Apply Shati's suggestion

* Remove duplicate line

Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>

* Package deletion 2.0 last updates (#17880)

* Update versioning and placeholder note

* syntax improvement

* Note the 25 downloads caveat

* Add more headings

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Sarah Edwards <skedwards88@github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Packages REST API page (#17808)

* Add draft of packages REST page

* Add packages in TOC

* Rewrite Packages API introductory info

* Fix space

* Rewrite conceptual API intro content

* Revise this line

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Mark Phelps <markphelps@github.com>

* Add rewrite

* Add de dereferenced files

* Add the decorated files

* ALL of the decorated files

* Revert "ALL of the decorated files"

This reverts commit 38f13dcd75078f2eacb53dfd0b31c79737966656.

* Revert "Add the decorated files"

This reverts commit b0c8a2096c8b19e62404585f97298ab42822d3e5.

* Revert "Add de dereferenced files"

This reverts commit abd377c8eb804e9c69dffa9b0c01ec64fb500727.

* Commit the lib/rest/static files to preview changes on staging

* Revert "Commit the lib/rest/static files to preview changes on staging"

This reverts commit acb121ae9d8bd2e23b00ebb14848e7b83aeddf5b.

Co-authored-by: Mark Phelps <markphelps@github.com>

* Commit static files to preview endpoints on staging

* Update references to API support

* remove static rest api files

* ditch "as a user" for now

* Rearrange based on feedback

* Last tidbits

* Update OpenAPI Descriptions (#17893)

* Update OpenAPI Descriptions

* Add decorated OpenAPI schema files

* link fix

Co-authored-by: Martin Lopes <martin389@github.com>
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
Co-authored-by: Sarah Edwards <skedwards88@github.com>
Co-authored-by: Mark Phelps <markphelps@github.com>
Co-authored-by: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com>
2021-02-17 17:02:10 -08:00
..
2020-11-24 12:20:10 -08:00
2020-11-24 12:20:10 -08:00

REST

About this directory

  • lib/rest/index.js is human-editable.
  • lib/rest/static/*.json are generated by scripts.

Editable files

  • lib/rest/index.js consumes the static decorated schema files and exports categories, operations, and operationsEnabledForGitHubApps used 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 GitHub
  • lib/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.