Gluecon 2017: API Modelling Framework - A Toolbox for Interacting With API Specs

Preview:

Citation preview

A Toolbox for API Specs

Antonio Garrote, Principal Engineer, Gluecon 2017

API Modeling Framework

Introduction to AMF

All contents © MuleSoft Inc.

What is AMF?

3

• Project under current development in MuleSoft

• Goal– Capture all the information about an organisation APIs and APIs’ data

into a single unified model

• Features– Modular and reusable descriptions– Describe multiple kinds of APIs– Decentralised model description– Support for multiple syntaxes– Extensible descriptions– Foundation for Domain Driven approach to APIs

All contents © MuleSoft Inc.

AMF Model

4

All contents © MuleSoft Inc.

AMF Model

5

All contents © MuleSoft Inc.

AMF Model

6

All contents © MuleSoft Inc.

AMF Model

7

All contents © MuleSoft Inc.

AMF Model

8

All contents © MuleSoft Inc.

AMF Model

9

AMF Model Demo

All contents © MuleSoft Inc.

AMF Model Demo: Exploring document declarations

11

All contents © MuleSoft Inc.

AMF Model Demo: Exploring the domain model

12

All contents © MuleSoft Inc.

AMF Model Demo: Domain model graph

13

All contents © MuleSoft Inc.

AMF Model Demo: Domain graph after resolution

14

AMF Features

All contents © MuleSoft Inc.

RAML / OpenAPI Interoperability

16

All contents © MuleSoft Inc.

RAML / OpenAPI Interoperability

17

•Mapping functions are not bijective:

• Every valid RAML/Open API model is a valid AMF model• Every valid AMF model is not a valid RAML model• Every valid AMF model is not a valid Open API model

All contents © MuleSoft Inc.

RAML / OpenAPI Interoperability

18

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

19

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

20

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

21

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

22

AMF Interop Demo

All contents © MuleSoft Inc.

AMF Interop Demo: RAML -> OpenAPI translation

24

All contents © MuleSoft Inc.

AMF Interop Demo: RAML -> OpenAPI translation

25

All contents © MuleSoft Inc.

Document Level Dependency Tracking

26

All contents © MuleSoft Inc.

Document Level Dependency Tracking

27

All contents © MuleSoft Inc.

Document Level Dependency Tracking

28

AMF Server Demo

All contents © MuleSoft Inc.

AMF Server Demo: Exploring APIs repositories

30

All contents © MuleSoft Inc.

AMF Server Demo: Tracking dependencies

31

All contents © MuleSoft Inc.

AMF Server Demo: Pushing changes with deps

32

All contents © MuleSoft Inc.

Domain Level Dependency Tracking

33

All contents © MuleSoft Inc.

Domain Level Dependency Tracking

34

All contents © MuleSoft Inc.

Domain Level Dependency Tracking

35

AMF Diff Explorer Demo

All contents © MuleSoft Inc.

AMF Diff Demo: Computing semantic hash

37

All contents © MuleSoft Inc.

AMF Diff Demo: Diff entity report

38

All contents © MuleSoft Inc.

AMF Diff Demo: Diff graph

39

All contents © MuleSoft Inc.

AMF Diff Demo: Diff graph

40

All contents © MuleSoft Inc.

Validation

41

All contents © MuleSoft Inc.

Validation

42

All contents © MuleSoft Inc.

Validation

43

AMF Validation Demo

All contents © MuleSoft Inc.

AMF Validation Demo: RAML Types

45

All contents © MuleSoft Inc.

AMF Validation Demo: JSON Schema

46

All contents © MuleSoft Inc.

Model Management

47

AMF Query Demo

All contents © MuleSoft Inc.

AMF Query Demo: Model query

49

All contents © MuleSoft Inc.

AMF Query Demo: Introspection query

50

All contents © MuleSoft Inc.

Built with Standards

51

Feature StandardData Model RDFValidation SHACLVocabulary Modeling OWLQuery SPARQLVocabularies Schema.org / Hydra

W3C Standards Demo

All contents © MuleSoft Inc.

W3C Standards Demo: JSON-LD RDF Graph

53

All contents © MuleSoft Inc.

W3C Standards Demo: SHACL Constraints

54

All contents © MuleSoft Inc.

W3C Standards Demo: SPARQL Query

55

All contents © MuleSoft Inc.

Open Source

56

https://github.com/raml-org/api-modeling-framework

Thank You

Recommended