rittenhop-dev/versions/5.94.2/node_modules/@tryghost/admin-api-schema/lib/schemas
2024-09-23 19:40:12 -04:00
..
images-upload.json first commit 2024-09-23 19:40:12 -04:00
images.json first commit 2024-09-23 19:40:12 -04:00
index.js first commit 2024-09-23 19:40:12 -04:00
labels-add.json first commit 2024-09-23 19:40:12 -04:00
labels-edit.json first commit 2024-09-23 19:40:12 -04:00
labels.json first commit 2024-09-23 19:40:12 -04:00
media-upload.json first commit 2024-09-23 19:40:12 -04:00
media.json first commit 2024-09-23 19:40:12 -04:00
members-add.json first commit 2024-09-23 19:40:12 -04:00
members-edit.json first commit 2024-09-23 19:40:12 -04:00
members-upload.json first commit 2024-09-23 19:40:12 -04:00
members.json first commit 2024-09-23 19:40:12 -04:00
pages-add.json first commit 2024-09-23 19:40:12 -04:00
pages-edit.json first commit 2024-09-23 19:40:12 -04:00
pages.json first commit 2024-09-23 19:40:12 -04:00
posts-add.json first commit 2024-09-23 19:40:12 -04:00
posts-edit.json first commit 2024-09-23 19:40:12 -04:00
posts.json first commit 2024-09-23 19:40:12 -04:00
products-add.json first commit 2024-09-23 19:40:12 -04:00
products-edit.json first commit 2024-09-23 19:40:12 -04:00
products.json first commit 2024-09-23 19:40:12 -04:00
README.md first commit 2024-09-23 19:40:12 -04:00
snippets-add.json first commit 2024-09-23 19:40:12 -04:00
snippets-edit.json first commit 2024-09-23 19:40:12 -04:00
snippets.json first commit 2024-09-23 19:40:12 -04:00
tags-add.json first commit 2024-09-23 19:40:12 -04:00
tags-edit.json first commit 2024-09-23 19:40:12 -04:00
tags.json first commit 2024-09-23 19:40:12 -04:00
tiers-add.json first commit 2024-09-23 19:40:12 -04:00
tiers-edit.json first commit 2024-09-23 19:40:12 -04:00
tiers.json first commit 2024-09-23 19:40:12 -04:00
webhooks-add.json first commit 2024-09-23 19:40:12 -04:00
webhooks-edit.json first commit 2024-09-23 19:40:12 -04:00
webhooks.json first commit 2024-09-23 19:40:12 -04:00

JSON Schema structuring convention

When adding a new schema or definition following naming convention should be followed:

  1. Name the file containing JSON definitions in the same way as resource is named in the API (aka "docName" in controller config). For example, for tags the definitions file would be tags.json
  2. Name the file containing JSON schema (which usually references "definitions") using following convention {resourceName}-{methodName}.json. For example, for tags.edit method file would be named tags-edit.json
  3. Update index.js list with a new definition name

The need to have separate "definitions" and "schema" files comes from schema reusability pattern that JSON schema allows for through $ref keyword. In some cases, the pattern doesn't quite work out because of limitations of the syntax (cannot override parts of referenced definition). Generally try to reuse as much schema as possible to avoid duplication unless it becomes painful to do so.