Analyzer::Specification::SchemaApiCommon
Shared primitives for the schema-generated API analyzers (Strapi, Directus, Payload, Supabase/PostgREST, Hasura, Appwrite).
These platforms all derive their HTTP surface from a schema file rather than from route declarations in source, so they share the same building blocks: turn a resource name into CRUD URLs, turn a attribute list into params, and tag the result.
Deliberately primitives rather than a base class or a unified
emit_crud. The six diverge exactly where a shared CRUD routine
would have to commit: Hasura has no CRUD skeleton at all (GraphQL
only), PostgREST has no item URL (rows are addressed by filter),
and Payload/Appwrite carry large non-CRUD route families. Each
analyzer spells out its own verb sequence the way
Analyzer::Specification::OData#emit_entity_set does.
Instance methods
Joins a mount prefix to a route path without doubling or dropping the separator.
Appends one endpoint, tagged so --exclude/filtering can target
a single platform or a single operation kind.
/:id -> /{id}. Emit the brace form so the optimizer's
add_path_parameters pass picks the segment up: normalize_url_shape
only rewrites the colon form for insomnia/postman, so a :id
emitted here would survive verbatim into output.
Dedups on (name, param_type), mirroring Endpoint#push_param.
Used while a param array is still being assembled, before the
Endpoint exists.