17
js-montreal - June 2015 presented by Jonathan Stoikovitch

Raml mtljs-20150609

Embed Size (px)

Citation preview

js-montreal - June 2015 presented by Jonathan Stoikovitch

> What is RAML?Why RAML?Practical example: API notebook Practical example: e2e RAML application

What is RAML?Stands for RESTful API Modeling Language

It's a way of describing APIs in a way that's highly readable by both humans and computers

It focuses on cleanly describing resources, methods, parameters, responses, media types, and other HTTP constructs that form the basis for modern APIs

Other solutions: Swagger, API Blueprint

a RAML file

define anything, e.g. query params

resource typeschema

trait

trait, resource type, schema

optional version in baseUri

template URIs

query parameters

headers (on request and response)

response per status code

example (and schema) per media type

covers full HTTP

externalizable

inheritance

pull in traits

parametrize

Patterns: resource types

mix-ins

Patterns: method-level traits

or just use good ol' form data:

XML schema

JSON schema

examples

Patterns: body schemas

What is RAML?> Why RAML?Practical example: API notebook Practical example: e2e RAML application

Why RAML?

• Clean, simple, based on YAML

• Lots of tools: Client generators, Documentation generators, Mock backend generators, API Console & API Notebook

Why RAML?Industry Backing

What is RAML?Why RAML?> Practical example: API notebook Practical example: e2e RAML application

API NotebookExample using RAML JavaScript client + Github API

What is RAML?Why RAML?Practical example: API notebook > Practical example: e2e RAML application

e2e RAML applicationExample using Ramses + RAML JavaScript client