class

Analyzer::Specification::PayloadCms

Inherits Analyzer::Specification::SchemaApiCommon < Analyzer::Specification::SpecificationEngine < Analyzer < FileHelper < Reference < Object

Payload CMS mounts every collection at /api/<slug> and every global at /api/globals/<slug>, generating the CRUD verbs plus auth and version route families from flags on the config.

Constants

DEFAULT_API_PREFIX = "/api"
FIELD_TYPE_HINTS = {"text" => "string", "textarea" => "string", "email" => "string", "code" => "string", "richtext" => "string", "select" => "string", "radio" => "string", "relationship" => "string", "upload" => "string", "number" => "number", "checkbox" => "boolean", "date" => "datetime", "json" => "object", "group" => "object", "point" => "array", "array" => "array", "blocks" => "array"}
MAX_FIELD_DEPTH = 2

Matches graphql_sdl_parser's nesting cap.

MAX_FILTER_PARAMS = 25
NESTING_TYPES = {"group", "array", "blocks"}

These do carry a name and nest their children under it.

PRESENTATIONAL_TYPES = {"row", "collapsible", "ui"}

Layout-only field types carry no name; their children belong to the parent document. Most real configs wrap fields in these, so hoisting is what makes the body params correct.

TAG_SOURCE = "payload_cms_analyzer"

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source