The Gateway Manager supports the storage of API definitions in different formats. The format defines how the service is stored and differs also in the way differences can be managed within the repository. There are two supported file formats: “GMU Single File” and “APIIDA Enhanced”. The following article explains the differences between those formats.
Table of Contents |
---|
Please note that GMU Single File is primarily meant to read already existing repositories. Its use is highly discouraged, as it is not well suited for git-based storage. This format contains timestamps and version numbers, that change with every push to the repository, making it hard to track what actually changed. APIIDA’s Enhanced Format takes care of this by removing timestamps and version numbers before a push to a git repository.
APIIDA’s Enhanced Format also splits up the actual policies from configuration. This eliminates nested XML structures. Everything that is not a policy is also stored conveniently in JSON, so that automated processes are much easier to implement. On top of that JSON is a much better fit for git, as it maintains its validity in automatic merges most of the time, while XML tends to break.
GMU Single File
The GMU Single File format relates to the storage format used by the Layer7 Tool “Gateway Migration Utility”. The storage format is shown in the following image:
...
The “APIIDA Enhanced” format adds to two folders to the described format “GMU Single File” format above. A folder “policies” which contains one or more individual service definitions in XML as <l7:Service> objects. Additionally, a “conf” folder is added which contains several configuration descriptions in JSON. The format is shown below:
...
These JSON files contain descriptions of several resources used within one or multiple policies. The definition of “resource” is used here accordingly to follows the official Layer7 definition (review the Restman documentation for a complete list of resources).
...