Stone.js API
    Preparing search index...
    • Read what a route promises to return, from the resource that will shape it.

      This is the half of a contract that usually has to be written twice: once as the projection the code performs, once as the response the document claims. A resource publishes its schema, the runtime validates against it, and this reads the same declaration — so the document cannot say one thing while the endpoint answers another.

      Fragments come with it. A resource exposing summary is exposing a second documented shape, not a private convenience, so the contract names it too.

      Parameters

      • declared: unknown

        What the route declared under resource.

      • registries: DerivationRegistries = {}

        The registry to resolve a name against, and how to build a class.

      • route: string = '(unknown route)'

      Returns { fragments?: Record<string, unknown>; schema: unknown }

      The response schema and its fragments, or undefined when nothing could be read.