AMF Reference
AMF refers to MuleSoft’s AML Modeling Framework for modeling documentation and it’s metadata. In this context, AMF is leveraged to parse and normalize API documentation from varying sources and formats, to one format which is the AMF file. We then leverage HTML Web Components created by MuleSoft to render this API documentation by passing it the generated AMF. These HTML Web Components may be referred to as API Console components, ARC (advanced rest components) components, or api documentation components (for the npm package).
Ref:
https://a.ml/docs/amf/
https://github.com/aml-org/amf
AMF Reference Component
Components: doc-amf-reference, apihub-amf-topic
The AMF Reference Component is a LWC component defined within the developer website’s theme. This component is rendered on the API Reference pages.
Ref: https://github.com/salesforcedevs/developer-website/tree/main/theme/src/modules/apihub
This component takes as input a list of JSON metadata containing the URL information of the reference spec data files. This JSON configuration is generated for each writer repository that contains reference content, and is generated by the SFDocs framework.
This component
- Takes as input the reference data files (as AMF JSON)
- Parses the AML data into a model
- Plugs the model into the ARC components to surface documentation content
- Handles navigation events to browse the content
AMF Parser
Ref: https://github.com/salesforcedevs/developer-website/blob/main/theme/src/modules/apihub/amfReference/amf-parser.js
This class parses the AMF JSON data for one spec and extrapolates the data specific to rendering sections of that specs topic documentation.
The parsed data includes:
- Title
- Topics:
- Summary
- Endpoints
- Types
- Docs
- Security