API Generation Logo API Generation
Bootstrap Themes

Learn

A picture paints a thousand words.

Fred R. Barnard
Learn how to use the Model Transform Tools (MTT) to generate API specification, message schemas, documentation and more, from easy to understand, pictorial representations of your business information.

The following sections describe various aspects of the tool, process, some example projects and their generated outputs.

MTT Overview

This section gives an overview of the MTT to put the overall process into context. The figure below shows the key components:

The MTT structure and process
The MTT structure and process

Deployment

The MTT can be run either:

Projects

Projects are where the key inputs and outputs for the MTT are held. These are:

Project Folder Structure
Project Folder Structure

This file structure and file contents are the same whether the project is hosted on GitHub or locally.

Local Projects

Local projects can be stored anywhere on a file system but it is recommended that a simple structure, similar to GitHub, is used with a repo-base folder and all MTT projects located under that. Unlike with GitHub repositories, maintaining version control through Git or similar, is a manual process and not managed by the MTT

GitHub Projects

MTT has a tight integration with projects stored in GitHub repositories and will manage retrieving the input files and storing and committing and output back to GitHub. Consequently, to run the MTT on a GitHub project requires the user to have a GitHub account and for the MTT to be registered as a GitHub application by the user/organisation. MTT can also be invoked directly from GitHub, using Actions, as part of a CD/CI workflow.

Running the MTT

This section describes the various steps in selecting a project, running the chosen generators and viewing the results of the generation process.

MTT Home page

The MTT Home page consists of two sections, Projects and Learn as shown in the figure and described below.

The MTT home page
The MTT home page

Projects

As described, Projects can be stored in either GitHub or Local repositories. Clicking on either of the 'Select Project' buttons will go to a page that has a drop-down of available MTT projects and a set of checkboxes to allow selection of the generators to be run. As shown in the figure below.

Running MTT Generators on a project
Running MTT Generators on a project
Once the generators have run, one of two pages will be displayed:
Summary of a generate run
Summary of a generate run

Learn

Currently just this page, though this will be expanded to provide training on developing models suitable for use in generating valid and complete outputs.

Generators

Running one or more generators, over an information-model, to produce output files is the fundamental purpose of the MTT.

Existing Generators

There are a number of Generators currently available with the MTT but, as described below, tailoring or developing new generators is often needed for a particular application.

API Specification Generators
Schema Definition Generators
Markdown Document Generators

Developing New Generators

As described in MTT Overview, a core design principle of the MTT Internal Model is to make adding new Generators, flexible, quick and easy.

However, creating a new Generator does require some key information to be available as described and illustrated below. The figure aims to bring out two key points, using the OpenAPI and Reversed standards as examples:

  1. Dependencies between standards. As shown, the OpenAPI standard and the Reversed standard depend on the JSON Schema Standard and the JSON Standard for their syntax.
  2. Generators must to conform to all relevant standards. As shown, both the OpenAPI and Reversed standards depend on the lower-level JSON and JSON-Schema standard, for the format (syntax) of the generated files, but it is the higher-level OpenAPI and Reversed standards that define the structure (semantics) of what the generators must produce.
Generator Dependencies
Generator Dependencies

Example Projects

There are four example projects that illustrate various aspects of the information models that input to the MTT process and the generated outputs. Both the information models and the generated outputs can be viewed on the Example Projects page: