15
API Description Languages

Consuming API description languages - Refract & Minim

Embed Size (px)

Citation preview

API Description Languages

Swagger 0.8 API Blueprint

RAML

Swagger 1.2

Swagger 2.0RADL

“That Microsoft Thing”

Google API Discovery Protocol

Brief History of Time

Experimentation is good

Lang 1

AST

awesomeness

parse

use

Usage

UsageLang 1

AST

awesomeness

parse

use

Lang 2

parse

AST

use

UsageLang 1

AST

data model

parse

normalize

Lang 2

parse

AST

normalize

awesomeness

use

This is happening all over

Most don’t bother

Solution!

abstraction

https://github.com/refractproject

https://github.com/refractproject

recursive data structure for expressing complex structures, relationships, and metadata.

Refract

A library for interacting with Refract elementsMinim

https://github.com/refractproject/refract-spec

"foobar"

{ "element": "string" "content": “foobar", "meta": {}, "attributes": {}}

https://github.com/refractproject/refract-spec

https://github.com/refractproject/minim

Easy querying of refracted data

let namespace = minim.namespace() .use(apiDescription);

let api = namespace.fromCompactRefract(…);

Goal

Abstract away 90% usecases

Provide easy querying on all API Desc Langs