Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

filip26/eiger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eiger

Transform and validate Application-Level Profile Semantics (ALPS) documents.

Java CI with Maven Language grade: Java Maintainability Rating Security Rating License

Table of Contents

Features

Mode ALPS+XML ALPS+JSON ALPS+YAML OpenAPI 3.0
read ✔️ ✔️ ✔️
write ✔️ ✔️ ✔️

Service

https://eiger.apicatalog.com

CLI

Usage

> ./eiger -h
Usage: eiger [-h] [COMMAND]

Transform and validate ALPS documents

Options:
  -h, --help   display a help message

Commands:
  validate   Validate ALPS document
  transform  Transform documents into ALPS
> ./eiger -h transform
Usage: eiger transform [-pv] [-s=(xml|json|oas)] [-t=(xml|json|yaml)] [<file>]

Transform documents into ALPS.

Parameters:
      [<file>]    input file

Options:
  -s, --source=(xml|json|oas)
                  source media type, e.g. --source=oas for OpenAPI
  -t, --target=(xml|json|yaml)
                  target media type, e.g. --target=yaml for alps+yaml
  -p, --pretty    print pretty JSON|XML
  -v, --verbose   include default values
> ./eiger -h validate
Usage: eiger validate [-s=(json|xml)] [<file>]

Validate ALPS document

Parameters:
      [<file>]              input file

Options:
  -s, --source=(json|xml)   source media type, e.g. --source=json for alps+json

Examples

Validation

> wget -q -O- https://raw.githubusercontent.com/alps-io/profiles/master/xml/contacts.xml | eiger validate --source=xml
# Valid ALPS document
- document: 
    media_type: application/alps+xml
    version: 1.0
    statistics:
      descriptors: 8
      docs: 5
      links: 1
      extensions: 0

Transformation

OpenAPI ➡️ ALPS+YAML

> wget -q -O- https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml | eiger transform --source=oas --target=yaml

ALPS+XML ➡️ ALPS+YAML

> wget -q -O- https://raw.githubusercontent.com/alps-io/profiles/master/xml/contacts.xml | eiger transform --source=xml --target=yaml

Contributing

All PR's welcome!

Roadmap

  • 0.1 JsonParser & JsonWriter
  • 0.2 XmlParser & XmlWriter
  • 0.3 CLI - validation, transformations (ALPS+JSON ↔️ ALPS+XML)
    • 0.3.1 YamlWriter (ALPS+JSON/ALPS+XML ➡️ ALPS+YAML)
  • 0.4 OpenAPI Specification (OAS ➡️ ALPS)
    • 0.4.1 Native Executables (Ubuntu, MacOS)
  • 0.5 Effective Profile Processor
  • 0.6 Similarity / Semantic Equivalence
  • 0.7 YamlParser (ALPS+YAML ➡️ ALPS+JSON/ALPS+XML)
  • TBD

Building

Fork and clone the project repository. Compile sources:

> ./mvnw clean package install

Resources

Commercial Support

Commercial support is available at filip26@gmail.com