18
OData Tool - Model First Rongfang Wang Software Engineer

OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

OData Tool - Model First

Rongfang Wang

Software Engineer

Page 2: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Agenda

• Why develop Model First?

• What is Model First?

• How to use Model First?

• Where is Model First?

Page 3: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Why develop Model First?

Page 4: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Background

• Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs.

• Exposing public RESTful APIs requires more work than just building the API.

1) API document: (available resources, the schema, sample requests/responses, behaviors, and etc.)

2) SDK

3) API validation tool

Page 5: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Traditional RESTful API development lifestyle

Des

ign

Imp

lem

en

tV

alid

ate

Do

cum

en

t

Requirement API Spec

API Doc

Service Validation Code

Finished Code

Manual writing

Manual coding Man

ual co

din

g

Man

ual w

riting

Page 6: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

What is Model First?

Page 7: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Model First Capabilities

OData specific capability Generic capabilities

Page 8: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

• Swagger is a popular framework for RESTful APIs.

• Swagger Specification has been donated to the Open API Initiative (OAI) and is the foundation of the OpenAPI Specification.

Swagger framework can provide the 3 generic capabilities mentioned previously

• Swagger document

• Swagger Editor

• Swagger provides a rich set of tools (i.e. Swagger Code Generator)

Page 9: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Proposed RESTful API development lifestyle D

esig

nIm

ple

me

nt

Val

idat

eD

ocu

me

nt

RequirementMachine-readable API representation

API Doc

Service Validation Code

Scaffold code Finished code

API Spec

Auto-Gen

Reduced manual coding

Auto-Gen

Au

to-G

en

Au

to-G

en

Interactive writing

Page 10: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Model First Design

OData conventions

RoutingKey…

JSON Model

YAML

EDM/CSDL

Scaffold code

Swagger Spec

Swagger Spec

EDM/CSDL

YAML

Input

Core Module

Output

Page 11: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

How to use Model First?

Page 12: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

New Guide Demo

Page 13: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Sample Demo

Page 14: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Generate Service Code Demo

Page 15: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Generate Client Code Demo

Page 16: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Where is Model First?

Page 17: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Resource

• Model First• Beta Hosted URL: http://apidocument.azurewebsites.net/

• Github:https://github.com/OData/model-first/

• Swagger Editor• Home: http://editor.swagger.io/#/

• OData team• Conventions: http://odata.org

• Mail to: [email protected]

Page 18: OData Tool - Model First · Background •Nowadays companies which produce internet applications (web/mobile) depend on RESTful APIs to fulfill different business needs. •Exposing

Thank You!

Questions?

© Microsoft Corporation. All rights reserved.