SlideShare a Scribd company logo
1 of 12
Download to read offline
REST	
  APIs	
  
dokumentieren	
  mit	
  
Swagger
Daniel	
  Pozzi,	
  FrOSCon 2015
Über	
  Swagger und	
  mich
2
https://github.com/bonndan https://swagger.io/
Apache	
  2	
  license
APIs	
  für	
  Nicht-­‐EntwicklerSwagger-­‐UI
3
Demo	
  (swagger-­‐demo	
   starten):
http://localhost:8080/docs/index.html?url=http://localhost:8080
/api-­‐docs/swagger.json
Offizieller	
  Swagger demo pet store:
http://petstore.swagger.io/
In	
  Produktion:
https://app.leanix.net/demo/api/v1/
4
Das	
  Herzstück:	
  die	
  
JSON	
  Spezifikation
5
Aus	
  dem	
  Demo:
https://goo.gl/If4I2t
Swagger Workflow
6
JSON
Spezifikation
HTML	
  API	
  UI
SDK	
  Generierung
Code
Annotation
Swagger Annotations
7
Swagger Annotations
https://github.com/swagger-­‐api/swagger-­‐core/wiki/Annotations-­‐1.5.X
Für	
  PHP:	
  http://zircote.com/swagger-­‐php/annotations.html
SDK	
  Generierung
8
Beispiel	
  für	
  PHP	
  und	
  Java:
https://github.com/leanix/swagger-­‐demo-­‐codegen
Konfiguration:
https://goo.gl/plH6pB
Ausführung	
   (leanix/swagger-­‐demo	
  erforderlich):
$	
  ./generate-­‐php.sh
$	
  ./generate-­‐php.sh
Swagger nutzt	
  Mustache
9
Code:
https://goo.gl/cdlXKl
Java	
  und	
  
Swagger
Maven Swagger Plugin statt	
  
Scala	
  Runtime!
10
https://github.com/leanix/swagger-­‐demo/blob/master/pom.xml#L77
Plugin:
http://kongchen.github.io/swagger-­‐maven-­‐plugin
Tricks	
  und	
  Fallen
11
• Vorsicht	
  mit	
  Enums in	
  Swagger V1
• Map-­‐artige	
  Typen	
  erfordern	
  Handarbeit
• Wie	
  man	
  Parameter	
  verbirgt	
  (Spec Filter):	
  https://goo.gl/21qtz9
• Java:	
  Swagger-­‐UI,	
  swagger.json in	
  Uberjar packen
Bespiel	
  mit	
  Dropwizard:	
  https://goo.gl/jSP0GN
• SwaggerUI kann	
  man	
  leicht	
  an	
  das	
  Unternehmens	
  – CI	
  anpassen,	
  im	
  demo-­‐Projekt	
  als	
  git
submodule
Referenzen und	
  mehr
12
Mehr:	
  
http://swagger.io/open-­‐source-­‐integrations/
Code:
https://github.com/leanix/swagger-­‐demo
Alternativen:
https://raml.org
https://github.com/mashery/iodocs
http://www.mashery.com/api/io-­‐docs

More Related Content

Viewers also liked

Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...
Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...
Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...insertEFFECT GmbH
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerLeanIX GmbH
 
5 - Unternehmensführung
5 - Unternehmensführung5 - Unternehmensführung
5 - UnternehmensführungTobias Illig
 
Artikel Tobias Illig: Der bewegte Mann(ager)
Artikel Tobias Illig: Der bewegte Mann(ager)Artikel Tobias Illig: Der bewegte Mann(ager)
Artikel Tobias Illig: Der bewegte Mann(ager)Tobias Illig
 
Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...
Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...
Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...Sebastian Deterding
 
Verhaltensänderung speichern? Über persuasives Webdesign
Verhaltensänderung speichern? Über persuasives WebdesignVerhaltensänderung speichern? Über persuasives Webdesign
Verhaltensänderung speichern? Über persuasives WebdesignSebastian Deterding
 
Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13
Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13
Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13Christian Riedel
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Viewers also liked (10)

Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...
Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...
Die Windows 8 Tablet App der DATEV mit SCRUM - Lessions Learned - Developer W...
 
SAP Business Objects Software development Kit
SAP Business Objects Software development Kit SAP Business Objects Software development Kit
SAP Business Objects Software development Kit
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and Swagger
 
5 - Unternehmensführung
5 - Unternehmensführung5 - Unternehmensführung
5 - Unternehmensführung
 
Artikel Tobias Illig: Der bewegte Mann(ager)
Artikel Tobias Illig: Der bewegte Mann(ager)Artikel Tobias Illig: Der bewegte Mann(ager)
Artikel Tobias Illig: Der bewegte Mann(ager)
 
Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...
Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...
Persuasive Design or The Fine Art of Separating People from Their Bad Behavio...
 
Verhaltensänderung speichern? Über persuasives Webdesign
Verhaltensänderung speichern? Über persuasives WebdesignVerhaltensänderung speichern? Über persuasives Webdesign
Verhaltensänderung speichern? Über persuasives Webdesign
 
Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13
Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13
Storythinking: Die Kunst in Geschichten zu denken. Mein Vortrag bei #blogst13
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar to LeanIX Swagger REST API @ Open Source Konferenz FrosCon, Sankt Augustin

Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET CoreHands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET CoreGregor Biswanger
 
Swagger - Rest APIs im Griff
Swagger - Rest APIs im GriffSwagger - Rest APIs im Griff
Swagger - Rest APIs im Griffgedoplan
 
Einführung in die webOS Programmierung
Einführung in die webOS ProgrammierungEinführung in die webOS Programmierung
Einführung in die webOS ProgrammierungMarkus Leutwyler
 
Automatischer Build mit Maven - OPITZ CONSULTING - Stefan Scheidt
Automatischer Build mit Maven - OPITZ CONSULTING - Stefan ScheidtAutomatischer Build mit Maven - OPITZ CONSULTING - Stefan Scheidt
Automatischer Build mit Maven - OPITZ CONSULTING - Stefan ScheidtOPITZ CONSULTING Deutschland
 
REST Problems
REST ProblemsREST Problems
REST Problemspredic8
 
Gewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge UnternehmenGewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge UnternehmenBjoern Reinhold
 
OpenSocial und Apache Shindig
OpenSocial und Apache ShindigOpenSocial und Apache Shindig
OpenSocial und Apache ShindigMayflower GmbH
 
Vorstellung Open Social Ipc 2009
Vorstellung Open Social Ipc 2009Vorstellung Open Social Ipc 2009
Vorstellung Open Social Ipc 2009fruske
 
Augmented Reality Workshop
Augmented Reality WorkshopAugmented Reality Workshop
Augmented Reality Workshopargency
 
Automatischer Build mit Maven
Automatischer Build mit MavenAutomatischer Build mit Maven
Automatischer Build mit MavenStefan Scheidt
 
Cross Plattform Apps mit Visual Studio und Apache Cordova
Cross Plattform Apps mit Visual Studio und Apache CordovaCross Plattform Apps mit Visual Studio und Apache Cordova
Cross Plattform Apps mit Visual Studio und Apache CordovaPeter Hecker
 
Go on a Bughunt in production, but without a map! @ JavaLand 2023
Go on a Bughunt in production, but without a map! @ JavaLand 2023Go on a Bughunt in production, but without a map! @ JavaLand 2023
Go on a Bughunt in production, but without a map! @ JavaLand 2023QAware GmbH
 
PHAR better Tools
PHAR better ToolsPHAR better Tools
PHAR better ToolsPHP in DD
 
API Management
API ManagementAPI Management
API Managementpredic8
 
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...predic8
 
Top 10 Internet Trends 2006
Top 10 Internet Trends 2006Top 10 Internet Trends 2006
Top 10 Internet Trends 2006Jürg Stuker
 
Api Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformApi Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformStefan Adolf
 

Similar to LeanIX Swagger REST API @ Open Source Konferenz FrosCon, Sankt Augustin (20)

Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET CoreHands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
Hands-on Workshop: API-Dokumentation mit OpenAPI / Swagger in ASP.NET Core
 
Swagger - Rest APIs im Griff
Swagger - Rest APIs im GriffSwagger - Rest APIs im Griff
Swagger - Rest APIs im Griff
 
Einführung in die webOS Programmierung
Einführung in die webOS ProgrammierungEinführung in die webOS Programmierung
Einführung in die webOS Programmierung
 
RPA in a nutshell
RPA in a nutshellRPA in a nutshell
RPA in a nutshell
 
Automatischer Build mit Maven - OPITZ CONSULTING - Stefan Scheidt
Automatischer Build mit Maven - OPITZ CONSULTING - Stefan ScheidtAutomatischer Build mit Maven - OPITZ CONSULTING - Stefan Scheidt
Automatischer Build mit Maven - OPITZ CONSULTING - Stefan Scheidt
 
REST Problems
REST ProblemsREST Problems
REST Problems
 
Gewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge UnternehmenGewinnung von OPEN SOURCE Techniken für junge Unternehmen
Gewinnung von OPEN SOURCE Techniken für junge Unternehmen
 
OpenSocial und Apache Shindig
OpenSocial und Apache ShindigOpenSocial und Apache Shindig
OpenSocial und Apache Shindig
 
Vorstellung Open Social Ipc 2009
Vorstellung Open Social Ipc 2009Vorstellung Open Social Ipc 2009
Vorstellung Open Social Ipc 2009
 
Augmented Reality Workshop
Augmented Reality WorkshopAugmented Reality Workshop
Augmented Reality Workshop
 
Automatischer Build mit Maven
Automatischer Build mit MavenAutomatischer Build mit Maven
Automatischer Build mit Maven
 
Cross Plattform Apps mit Visual Studio und Apache Cordova
Cross Plattform Apps mit Visual Studio und Apache CordovaCross Plattform Apps mit Visual Studio und Apache Cordova
Cross Plattform Apps mit Visual Studio und Apache Cordova
 
3. Night of the pack
3. Night of the pack3. Night of the pack
3. Night of the pack
 
Go on a Bughunt in production, but without a map! @ JavaLand 2023
Go on a Bughunt in production, but without a map! @ JavaLand 2023Go on a Bughunt in production, but without a map! @ JavaLand 2023
Go on a Bughunt in production, but without a map! @ JavaLand 2023
 
PHAR better Tools
PHAR better ToolsPHAR better Tools
PHAR better Tools
 
Hdc2012 cordova-präsi
Hdc2012 cordova-präsiHdc2012 cordova-präsi
Hdc2012 cordova-präsi
 
API Management
API ManagementAPI Management
API Management
 
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
REST: Versprechen, Wirklichkeit & Alternativen: GraphQL, GRPC, JSON RPC...
 
Top 10 Internet Trends 2006
Top 10 Internet Trends 2006Top 10 Internet Trends 2006
Top 10 Internet Trends 2006
 
Api Platform: the ultimate API Platform
Api Platform: the ultimate API PlatformApi Platform: the ultimate API Platform
Api Platform: the ultimate API Platform
 

More from LeanIX GmbH

LeanIX Virtual Workspaces
LeanIX Virtual WorkspacesLeanIX Virtual Workspaces
LeanIX Virtual WorkspacesLeanIX GmbH
 
How to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual WorkspacesHow to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual WorkspacesLeanIX GmbH
 
Gartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven ArchitecturesGartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven ArchitecturesLeanIX GmbH
 
Application Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIXApplication Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIXLeanIX GmbH
 
Effective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutionsEffective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutionsLeanIX GmbH
 
Lean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio IntegrationLean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio IntegrationLeanIX GmbH
 
Next Level Enterprise Architecture
Next Level Enterprise ArchitectureNext Level Enterprise Architecture
Next Level Enterprise ArchitectureLeanIX GmbH
 
Integration Architecture with the Data Flow
Integration Architecture with the Data FlowIntegration Architecture with the Data Flow
Integration Architecture with the Data FlowLeanIX GmbH
 
LeanIX-ServiceNow Integration
LeanIX-ServiceNow IntegrationLeanIX-ServiceNow Integration
LeanIX-ServiceNow IntegrationLeanIX GmbH
 
Application Rationalization with LeanIX
Application Rationalization with LeanIXApplication Rationalization with LeanIX
Application Rationalization with LeanIXLeanIX GmbH
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLLeanIX GmbH
 
LeanIX Inventory: Import & Export
LeanIX Inventory: Import & ExportLeanIX Inventory: Import & Export
LeanIX Inventory: Import & ExportLeanIX GmbH
 
Survey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud TransformationSurvey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud TransformationLeanIX GmbH
 
The LeanIX Microservices Integration
The LeanIX Microservices IntegrationThe LeanIX Microservices Integration
The LeanIX Microservices IntegrationLeanIX GmbH
 
Ensure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIXEnsure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIXLeanIX GmbH
 
LeanIX-Signavio Integration
LeanIX-Signavio IntegrationLeanIX-Signavio Integration
LeanIX-Signavio IntegrationLeanIX GmbH
 
How to set up a Lean Standards Governance
How to set up a Lean Standards GovernanceHow to set up a Lean Standards Governance
How to set up a Lean Standards GovernanceLeanIX GmbH
 
Innovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX EnhancementsInnovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX EnhancementsLeanIX GmbH
 
Moving EA - from where we are to where we should be
Moving EA - from where we are to where we should beMoving EA - from where we are to where we should be
Moving EA - from where we are to where we should beLeanIX GmbH
 
Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?LeanIX GmbH
 

More from LeanIX GmbH (20)

LeanIX Virtual Workspaces
LeanIX Virtual WorkspacesLeanIX Virtual Workspaces
LeanIX Virtual Workspaces
 
How to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual WorkspacesHow to reduce complexity by segregating your data with Virtual Workspaces
How to reduce complexity by segregating your data with Virtual Workspaces
 
Gartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven ArchitecturesGartner EA: The Rise of Data-driven Architectures
Gartner EA: The Rise of Data-driven Architectures
 
Application Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIXApplication Harmonisation using Design Principles in LeanIX
Application Harmonisation using Design Principles in LeanIX
 
Effective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutionsEffective EAM: whet your appetite & deliver solutions
Effective EAM: whet your appetite & deliver solutions
 
Lean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio IntegrationLean EAM with the Microservices Add-on and the Signavio Integration
Lean EAM with the Microservices Add-on and the Signavio Integration
 
Next Level Enterprise Architecture
Next Level Enterprise ArchitectureNext Level Enterprise Architecture
Next Level Enterprise Architecture
 
Integration Architecture with the Data Flow
Integration Architecture with the Data FlowIntegration Architecture with the Data Flow
Integration Architecture with the Data Flow
 
LeanIX-ServiceNow Integration
LeanIX-ServiceNow IntegrationLeanIX-ServiceNow Integration
LeanIX-ServiceNow Integration
 
Application Rationalization with LeanIX
Application Rationalization with LeanIXApplication Rationalization with LeanIX
Application Rationalization with LeanIX
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQL
 
LeanIX Inventory: Import & Export
LeanIX Inventory: Import & ExportLeanIX Inventory: Import & Export
LeanIX Inventory: Import & Export
 
Survey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud TransformationSurvey Add-on Showcase: Cloud Transformation
Survey Add-on Showcase: Cloud Transformation
 
The LeanIX Microservices Integration
The LeanIX Microservices IntegrationThe LeanIX Microservices Integration
The LeanIX Microservices Integration
 
Ensure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIXEnsure GDPR Compliance with LeanIX
Ensure GDPR Compliance with LeanIX
 
LeanIX-Signavio Integration
LeanIX-Signavio IntegrationLeanIX-Signavio Integration
LeanIX-Signavio Integration
 
How to set up a Lean Standards Governance
How to set up a Lean Standards GovernanceHow to set up a Lean Standards Governance
How to set up a Lean Standards Governance
 
Innovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX EnhancementsInnovative API-Based LeanIX Enhancements
Innovative API-Based LeanIX Enhancements
 
Moving EA - from where we are to where we should be
Moving EA - from where we are to where we should beMoving EA - from where we are to where we should be
Moving EA - from where we are to where we should be
 
Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?Is next generation EAM more than just agile IT planning?
Is next generation EAM more than just agile IT planning?
 

LeanIX Swagger REST API @ Open Source Konferenz FrosCon, Sankt Augustin