footing 0.6.6

Feature-gated foundations for Rust backend services
Documentation
# Embedded RapiDoc assets

RapiDoc **14.0.0**, enabled by the optional `rapidoc-embedded` feature.
The preset targets this version's native `rapi-doc` attributes.

Source: <https://registry.npmjs.org/rapidoc/-/rapidoc-14.0.0.tgz>
Upstream commit: `ca4860f772caba5d982c81b1a316ee00cfbc4d06`.
The archive was verified against the npm release's SHA-512 integrity value.

- Tarball SHA-256: `9b82ce03c19084075b46ccc80bb665cdfd7f3ad9bd2066195350ca011e10dda6`
- Original `package/dist/rapidoc-min.js` SHA-256:
  `61f326a217985420001b628ef93dbba05c8446afc5f9fb1e0dac9fa49d99338a`
- Distributed bundle SHA-256:
  `7352025e16dbf16de55e4e77573ee1b6680a6c1205b39d5d6af1efb54197f950`

The bundle remains a standalone ES module. Both it and the initializer are loaded
as module scripts, in document order. Consumers need no npm, Node, build script
or build-time network access. The changes below are local corrections to the
upstream bundle; the bundle is their single source, with no patch generator.
The license comment points to the adjacent served `ui.LICENSE.txt` route.

## OAuth security patch

The readable section between `OAuth security patch start` and
`OAuth security patch end` preserves the bundled authorization transaction's
lifecycle and validation guarantees. Upstream 14 already generates random state,
nonce and PKCE values, validates popup message origin/source/state, and displays
errors as text; those native primitives are reused where applicable.
The original helpers are in
<https://github.com/rapi-doc/RapiDoc/blob/ca4860f772caba5d982c81b1a316ee00cfbc4d06/packages/rapidoc/src/templates/security-scheme-template.js>.

Only a complete response for the expected grant from the expected popup, receiver
origin and state can finish authorization. Unrelated or malformed messages leave
the listener active. Successful callbacks are consumed once. Popup closure,
cancellation, replacement, page navigation and a five-minute deadline clean up
listeners and outstanding requests. Concurrent schemes remain independent;
starting an attempt for the same scheme cancels its predecessor. Changing the
loaded specification prevents an old attempt from applying credentials.

The popup is opened before asynchronous PKCE calculation to retain the user
gesture. Receiver URLs must remain on the documentation origin, and authorization
URLs must use HTTP(S). Authorization, token and refresh URLs resolve against
the complete selected server path, including relative and protocol-relative URLs.
Token responses must be successful, well-formed and free of provider errors.
Credential whitespace is preserved; HTTP Basic encodes the client ID and secret
separately as required by OAuth. Punctuated security scheme IDs work without
being interpreted as CSS selectors.

The local `oauth-receiver.js` posts `{state, code, responseType: "code"}` or
`{state, access_token, token_type, responseType: "token"}` (plus `expires_in` when
present) and sends provider failures as `{state, error, error_description}`.
Duplicate or ambiguous query
and fragment parameters are rejected. Custom receivers must use this format.
Token expiry is passed to the native credential persistence code.
This integration uses `window.opener`, not BroadcastChannel; the documentation
and callback routes need the COOP configuration described in the public rustdoc.
The preset selects the local receiver and disables credential persistence.

## OpenAPI parsing corrections

The native `filter-operations` language selects operation IDs, method/path terms,
path globs, tags and badges, including exclusions and include-term ordering.
The initializer sets its public property before connecting the element and calls
`loadSpec()` once; no filter attribute callback starts a duplicate load.

Path filtering retains shared Path Item metadata, including references and
arbitrary extensions, only when an operation survives. It preserves the upstream
OpenAPI 3.2 `query` and `additionalOperations` support and filter ranks. Non-path
entries in the Paths Object are excluded from filtering and rendering so `x-*`
values cannot become fake endpoints or break loading.

Paths and webhooks render separately: a webhook named `/items` cannot replace
an ordinary `/items` operation. Each retains its own parameters and servers.
Navigation IDs use the upstream slugger with distinct path/webhook identities,
so same-named operations remain independently navigable. The upstream tag-group
prefix behavior is preserved. The served and downloaded specification is unchanged.

Operation servers override Path Item servers when present, instead of extending
them. Omitted servers inherit the Path Item list; an explicit empty list remains
empty for the native request component's document-server fallback.

## Verification and notices

Run the offline regression checks from the repository root:

```sh
node --test tests/rapidoc_security.test.cjs
```

The tests check the distributed SHA-256 and unique OAuth markers, exercise exact
functions extracted from the bundle, and run the actual receiver and initializer
with simulated browser APIs. They use only Node.js built-ins and never modify
assets. The checksum detects unrecorded changes, not whether a recorded change
is correct. Review updates against the original archive and bundle above and
verify actual module loading, OAuth, native options and CSP in a browser.

RapiDoc uses system fonts natively and does not load external fonts. Applications
own external references, Markdown images, API servers and overridden resource
URLs. Disabling the preset does not introduce font requests.

`LICENSES.txt` combines the upstream `package/LICENSE.txt` with the complete
`package/dist/rapidoc-min.js.LICENSE.txt` shipped in the same verified archive
(SHA-256 `b915cdbf187e6d3d00e3ca47e0dd02943c19163d84155c272f0f180779a03a41`).
The latter records the third-party code actually bundled by upstream; no local
npm install or dependency-license reconstruction is needed.