Checks one host-admitted narrative/OpenAPI publication before rendering.
The presentation's optional publication field and the OpenAPI extension
x-doc-shell-publication carry identical string-keyed bindings. A binding has
schema doc-shell-publication/v1 and nonempty opaque publication_id,
source_view, graph_position, locale, release, and disclosure_surface
strings. Every field must also match the expected binding supplied by the
host for this request. Thus two mutually consistent but stale inputs still
fail when the host expects another publication.
The host authenticates the request, admits both inputs and declares the expected view. This module compares those declarations and validates the existing presentation/OpenAPI shapes. It neither authenticates a binding nor discovers repositories, fetches sources, constructs collections or filters private content. Reusing a binding for altered source data violates the host's immutable-publication contract; equality is not proof of source authenticity.
Summary
Types
Host-declared immutable publication identity, with no authorization authority.
Validated inputs retained together for one renderer call.
Functions
Admits a typed graph presentation and OpenAPI document against the requested view.
Validates a closed publication binding and its finite opaque fields.
Types
Host-declared immutable publication identity, with no authorization authority.
@type t() :: %{ publication: binding(), presentation: DocShell.Presentation.Source.presentation(), openapi: map() }
Validated inputs retained together for one renderer call.
Functions
Admits a typed graph presentation and OpenAPI document against the requested view.
Bindings are required on both inputs and in expected. Shape validation and
comparison complete before an {:ok, pair} is returned. Errors identify the
input and mismatched field without returning its potentially private value.
Validates a closed publication binding and its finite opaque fields.