Skip to main content
Version: AMF v5.x.x

What is AMF?

AMF (AML Modeling Framework) is an open-source library capable of parsing and validating AML metadata documents. AMF is written in Scala.js, and you can execute it in the JVM, with Node.js, or from a browser. You can use AMF as a standalone command-line tool or as a library in Scala and Java, and in web and Node.js applications.

AMF source code is publicly available in the AMF GitHub repository under the Apache 2.0 License.

AMF project vision

AML enables you to formally describe different kinds of models, whether syntactic models—specific to languages or specifications-or semantic models specific to industries and domains.

AMF can parse and generate descriptions of those models as sets of modular documents and store those connected descriptions into a single unified data graph.

The modular design of AMF enables you to create plugins capable of parsing other metadata syntaxes not defined by AML. For example, the most used AMF module, the web-api module, can parse RAML, OAS (formerly Swagger), and AsyncAPI specification languages.

Furthermore, AMF can also validate APIs and emit them in different API languages.

AMF project goals

The AMF project supports:

  • Multiple formats with a unified programming interface and model
  • Syntactic and semantic model layers
  • Validation at syntactic and semantic model layers
  • Production of formal specifications of any specification language
  • An Extensible, single syntactic model for multiple semantic models
  • The creation of consistent parsing behaviors across different syntactic models
  • Bi-directional transformation and export
  • Custom parsing, resolution, and generation pipelines

Native support

AMF natively supports the following formats and semantic and syntactic models:

Formats

  • YAML
  • JSON

Semantic models

  • WebApi (or "Web APIs" as in "APIs accessible over the network")

Syntactic models

  • JSON-LD "AMF model"
  • RAML 0.8 and 1.0 (mapped to "WebApi")
  • OpenAPI (OAS) 2.0 and 3.0 (mapped to "WebApi")
  • AsyncAPI 2.0 (mapped to "AsyncApi")

You can extend these models and others using custom AML-defined models. For formats and models that cannot be expressed with AML, you can create custom plugins.

AMF Features

The key features of AMF include:

  • Parsing
  • Transformation
    • Stages and pipelines
  • Validation
    • Custom model constraints (WebApi)
    • SHACL (vocabularies and custom validations)
  • Rendering

Artifacts

Artifacts to use AMF can be obtained from: