gluecon 2017: api modelling framework - a toolbox for interacting with api specs

57
A Toolbox for API Specs Antonio Garrote, Principal Engineer, Gluecon 2017 API Modeling Framework

Upload: mulesoft

Post on 21-Jan-2018

625 views

Category:

Software


1 download

TRANSCRIPT

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

A Toolbox for API Specs

Antonio Garrote, Principal Engineer, Gluecon 2017

API Modeling Framework

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

Introduction to AMF

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

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

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

All contents © MuleSoft Inc.

AMF Model

4

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

All contents © MuleSoft Inc.

AMF Model

5

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

All contents © MuleSoft Inc.

AMF Model

6

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

All contents © MuleSoft Inc.

AMF Model

7

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

All contents © MuleSoft Inc.

AMF Model

8

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

All contents © MuleSoft Inc.

AMF Model

9

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

AMF Model Demo

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

All contents © MuleSoft Inc.

AMF Model Demo: Exploring document declarations

11

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

All contents © MuleSoft Inc.

AMF Model Demo: Exploring the domain model

12

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

All contents © MuleSoft Inc.

AMF Model Demo: Domain model graph

13

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

All contents © MuleSoft Inc.

AMF Model Demo: Domain graph after resolution

14

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

AMF Features

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

All contents © MuleSoft Inc.

RAML / OpenAPI Interoperability

16

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

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

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

All contents © MuleSoft Inc.

RAML / OpenAPI Interoperability

18

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

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

19

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

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

20

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

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

21

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

All contents © MuleSoft Inc.

RAML / OpenAPI Parsing and Generation

22

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

AMF Interop Demo

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

All contents © MuleSoft Inc.

AMF Interop Demo: RAML -> OpenAPI translation

24

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

All contents © MuleSoft Inc.

AMF Interop Demo: RAML -> OpenAPI translation

25

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

All contents © MuleSoft Inc.

Document Level Dependency Tracking

26

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

All contents © MuleSoft Inc.

Document Level Dependency Tracking

27

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

All contents © MuleSoft Inc.

Document Level Dependency Tracking

28

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

AMF Server Demo

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

All contents © MuleSoft Inc.

AMF Server Demo: Exploring APIs repositories

30

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

All contents © MuleSoft Inc.

AMF Server Demo: Tracking dependencies

31

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

All contents © MuleSoft Inc.

AMF Server Demo: Pushing changes with deps

32

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

All contents © MuleSoft Inc.

Domain Level Dependency Tracking

33

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

All contents © MuleSoft Inc.

Domain Level Dependency Tracking

34

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

All contents © MuleSoft Inc.

Domain Level Dependency Tracking

35

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

AMF Diff Explorer Demo

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

All contents © MuleSoft Inc.

AMF Diff Demo: Computing semantic hash

37

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

All contents © MuleSoft Inc.

AMF Diff Demo: Diff entity report

38

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

All contents © MuleSoft Inc.

AMF Diff Demo: Diff graph

39

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

All contents © MuleSoft Inc.

AMF Diff Demo: Diff graph

40

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

All contents © MuleSoft Inc.

Validation

41

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

All contents © MuleSoft Inc.

Validation

42

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

All contents © MuleSoft Inc.

Validation

43

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

AMF Validation Demo

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

All contents © MuleSoft Inc.

AMF Validation Demo: RAML Types

45

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

All contents © MuleSoft Inc.

AMF Validation Demo: JSON Schema

46

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

All contents © MuleSoft Inc.

Model Management

47

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

AMF Query Demo

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

All contents © MuleSoft Inc.

AMF Query Demo: Model query

49

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

All contents © MuleSoft Inc.

AMF Query Demo: Introspection query

50

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

All contents © MuleSoft Inc.

Built with Standards

51

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

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

W3C Standards Demo

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

All contents © MuleSoft Inc.

W3C Standards Demo: JSON-LD RDF Graph

53

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

All contents © MuleSoft Inc.

W3C Standards Demo: SHACL Constraints

54

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

All contents © MuleSoft Inc.

W3C Standards Demo: SPARQL Query

55

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

All contents © MuleSoft Inc.

Open Source

56

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

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

Thank You