Apimap.io

🎉 Welcome 🎉

This is a part of the Apimap.io project https://github.com/apimap, a freestanding solution to keep track of all functionality a company provides through an API. It is a push based system, connected with your build pipeline or manually updated using our CLI.

Application programming interface (API): Point of functional integration between two or more systems connected through commonly known standards

Why is this project useful? Lost track of all the API functionality provided inside your organization? Don't want to be tied to an API proxy or management solution? The Apimap.io project uploads, indexes and enables discoverability of all your organizations APIs. We care about the source code, removing the limitation of where the API is hosted and how your network is constructed.

Table of Contents

I want to know more of the technical details and implementation guides: DEVELOPER.md

Project Components


This is a complete software solution consisting of a collection of freestanding components. Use only the components you find useful, create the rest to custom fit your organization.

  • A Developer Portal with wizards and implementation information
  • A Discovery Portal to display APIs and filter search results
  • An API to accommodate all the information
  • A Jenkins plugin to automate information parsing and upload
  • A CLI to enable manual information uploads

Build and Run


This is the Jenkins plugin, created to automatically upload metadata and taxonomy files.

Jenkinsfile

The following is an example of how to use the plugin inside a Jenkinsfile

Default values (used if not overwritten when used)

The plugin is configured by default with the following values. If a value is not overwritten with another value the defaults will be used.

Argument Default Value
metadataFile "apimap/metadata.apimap"
taxonomyFile "apimap/taxonomy.apimap"
readmeFile "README.md"
changelogFile "CHANGELOG.md"
repositoryURL empty

Pipeline as Code

The following example show how to use the plugin in a Pipeline as Code environment.

pipeline {
    agent any
    stages{
        stage('Get source'){
            steps{
                git 'https://....'
            }
        }
        stage('Validate'){
            steps{
                script{
                    def result = validateAPI metadataFile: 'apimap/metadata.apimap', 
                            taxonomyFile: 'apimap/taxonomy.apimap'
                    
                    echo result.getDescription()
                }
            }
        }
        stage('Publish'){
            steps{
                script{
                    def result = publishAPI metadataFile: 'apimap/metadata.apimap',
                            taxonomyFile: 'apimap/taxonomy.apimap',
                            readmeFile: 'README.md',
                            changelogFile: 'CHANGELOG.md',
                            repositoryURL: scm.getUserRemoteConfigs()[0].getUrl()

                    echo result.getStatus().toString()
                    echo result.getDescription()
                    echo result.getToken()
                }
            }
        }
    }
}

Build JAR

Based on Java the easiest way to build the artifact is using package

mvnw package

If you build this component on anything newer than Java 8, please add the following parameter. This is due to a limitation in one of the jenkins dependencies.

-Dmaven.test.skip

Requirements

Java version 8 or newer.

Contributing


Read howto contribute to this project.