1) The document discusses using OpenAPI to describe APIs and increase productivity. It introduces OpenAPI tools like Swagger UI, Swagger Editor, and bravado-core that can generate documentation, validate requests, and convert data types.
2) An actual case study is presented on a manufacturing cloud platform called Kabuku Connect that uses the OpenAPI spec to generate API documentation, client code, and validate requests from the frontend.
3) The speaker encourages contributors to help support the new OpenAPI 3.0 specification and related tools, and invites attendees to apply for open developer roles at their company to build out projects using 3D printing and other technologies.
Writing REST APIs with OpenAPI and Swagger AdaStephane Carrez
The presentation was held in the Ada devroom at the FOSDEM 2018.
The OpenAPI specification is an emerging specification to describe RESTful web services. The Swagger suite is a collection of tools to write such API descriptions and have the code generated in more than 29 languages, including Ada. The presentation will describe how to write a REST operation with OpenAPI, generate the Ada client with Swagger Codegen and use the generated code to interact with the server. We will also describe the generated Ada server code and how to implement the server side and run a complete REST server.
OpenAPI is an the emerging standard for creating, managing and consuming REST APIs. Previously named Swagger, in the last year has been adopted by the Linux Foundation and gained the support of companies like Google, Microsoft, IBM, Paypal, etc. to become a de-facto standard for APIs. In this talk we will review 3 uses cases to apply OpenAPI to enhance and speed-up our developments to create OpenAPI compliant APIs.
OpenAPI 3.0, And What It Means for the Future of SwaggerSmartBear
OpenAPI 3.0, which is based on the original Swagger 2.0 specification, is meant to provide a standard format to unify how an industry defines and describes RESTful APIs.
The release of OAS 3.0 marks a significant milestone in the growth of the API economy — bringing together collaborators from across industries, to evolve the specification to meet the needs of API developers and consumers across the world in an open and transparent manner.
We hosted a free Swagger training: OpenAPI 3.0, And What it Means for the Future of Swagger. More than 2,000 people signed up to learn more about the new specification, and to find out about what’s coming next for Swagger and SwaggerHub!
You can watch the full recording of the presentation here: https://swaggerhub.com/blog/api-resources/openapi-3-0-video-tutorial/
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.
Swagger is an open source software framework backed by
a large ecosystem of tools that helps developers
design, build, document and consume RESTful Web
services.
Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. The overarching goal of Swagger is to enable client and documentation systems to update at the same pace as the server. The documentation of methods, parameters, and models are tightly integrated into the server code, allowing APIs to always stay in sync. With Swagger, deploying managing, and using powerful APIs has never been easier.
Writing REST APIs with OpenAPI and Swagger AdaStephane Carrez
The presentation was held in the Ada devroom at the FOSDEM 2018.
The OpenAPI specification is an emerging specification to describe RESTful web services. The Swagger suite is a collection of tools to write such API descriptions and have the code generated in more than 29 languages, including Ada. The presentation will describe how to write a REST operation with OpenAPI, generate the Ada client with Swagger Codegen and use the generated code to interact with the server. We will also describe the generated Ada server code and how to implement the server side and run a complete REST server.
OpenAPI is an the emerging standard for creating, managing and consuming REST APIs. Previously named Swagger, in the last year has been adopted by the Linux Foundation and gained the support of companies like Google, Microsoft, IBM, Paypal, etc. to become a de-facto standard for APIs. In this talk we will review 3 uses cases to apply OpenAPI to enhance and speed-up our developments to create OpenAPI compliant APIs.
OpenAPI 3.0, And What It Means for the Future of SwaggerSmartBear
OpenAPI 3.0, which is based on the original Swagger 2.0 specification, is meant to provide a standard format to unify how an industry defines and describes RESTful APIs.
The release of OAS 3.0 marks a significant milestone in the growth of the API economy — bringing together collaborators from across industries, to evolve the specification to meet the needs of API developers and consumers across the world in an open and transparent manner.
We hosted a free Swagger training: OpenAPI 3.0, And What it Means for the Future of Swagger. More than 2,000 people signed up to learn more about the new specification, and to find out about what’s coming next for Swagger and SwaggerHub!
You can watch the full recording of the presentation here: https://swaggerhub.com/blog/api-resources/openapi-3-0-video-tutorial/
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.
Swagger is an open source software framework backed by
a large ecosystem of tools that helps developers
design, build, document and consume RESTful Web
services.
Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. The overarching goal of Swagger is to enable client and documentation systems to update at the same pace as the server. The documentation of methods, parameters, and models are tightly integrated into the server code, allowing APIs to always stay in sync. With Swagger, deploying managing, and using powerful APIs has never been easier.
Supporting slide deck for Tony Tam's presentation at I Love APIs 2015. Covers the new swagger project, Swagger Inflector, which allows an API-first definition for REST APIs.
Lots of people talk about the benefits OpenAPI Specification (OAS) can bring to your documentation and testing efforts, but few people talk about the real complexities involved when you try to scale OpenAPI usage across a large organization. This talk is about how to scale your OAS usage, who should be using OAS, and what concrete steps you can take now to save lots of time later.
Finally, we’ll take a look at some real world API growing pains that we see at larger Stoplight customers, and their potential solutions.
As more and more companies are moving to the Cloud, they want their latest, greatest software features to be available to their users as quickly as they are built. However there are several issues blocking them from moving ahead.
One key issue is the massive amount of time it takes for someone to certify that the new feature is indeed working as expected and also to assure that the rest of the features will continuing to work. In spite of this long waiting cycle, we still cannot assure that our software will not have any issues. In fact, many times our assumptions about the user's needs or behavior might itself be wrong. But this long testing cycle only helps us validate that our assumptions works as assumed.
How can we break out of this rut & get thin slices of our features in front of our users to validate our assumptions early?
Most software organizations today suffer from what I call, the "Inverted Testing Pyramid" problem. They spend maximum time and effort manually checking software. Some invest in automation, but mostly building slow, complex, fragile end-to-end GUI test. Very little effort is spent on building a solid foundation of unit & acceptance tests.
This over-investment in end-to-end tests is a slippery slope. Once you start on this path, you end up investing even more time & effort on testing which gives you diminishing returns.
In this session Naresh Jain will explain the key misconceptions that has lead to the inverted testing pyramid approach being massively adopted, main drawbacks of this approach and how to turn your organization around to get the right testing pyramid.
Architecting an Enterprise API Management StrategyWSO2
A good internal and external API management strategy and architecture is key to building ecosystem platforms that lead to successful API economies in the enterprise. This workshop will look at best practices in API management using the WSO2 API Manager and Integration Platform products, which are used to rapidly implement RESTful design, enforce governance policies, safely scale solutions, orchestrate complex interaction sequences, and re-use assets. The session will also look at reference architectures and architectural recommendations of building large scale API ecosystems.
Director - Solutions Architecture at WSO2, Mifan Careem presented this session at APIdays Sydney 2015.
Swagger APIs for Humans and Robots (Gluecon)Tony Tam
Presentation to Gluecon 2014 about Swagger for API development and adoption of services. Reverb also announced the Swagger 2.0 Working Group, with Apigee as a founding member
Tracing Micro Services with OpenTracingHemant Kumar
Tracing in the world of micro services has become a standard with people using distributed tracers like Zipkin, Jaeger, Appdash etc. But, with so many different tracers, its confusing to choose one tracer and then painful to replace a tracer. That's where OpenTracing comes in. OT provides a consistent, vendor-neutral API to allow users to choose whatever distributed tracer they need and can change the tracer with just an O(1) operation.
API Management Solution Powerpoint Presentation SlidesSlideTeam
Select this API Management Solution PowerPoint Presentation Slides and study the needs of app developers. Display your company’s objectives like the expansion of the market base, building a platform ecosystem, and improving the digital outreach company through this application gateway PPT templates. Highlight the structure of architectural components of API with the help of this computing interface management PPT slide. You can easily introduce your services of API portal like documentation, registration, and analysis in a well-organized manner by taking the aid of our invigorating software management PPT designs. Take advantage of our professionally designed network administration PPT themes to exhibit various components like API design, deployment, security, analytics, and monetization in an appropriate color-coded fashion. You can take the assistance of this API solution PPT presentation to provide a report on API management in a well-organized format. Click the download button and make this open-source management PowerPoint presentation your source to educate prospective clients about attractive opportunities in the API management market. https://bit.ly/3tOpgMa
Supporting slide deck for Tony Tam's presentation at I Love APIs 2015. Covers the new swagger project, Swagger Inflector, which allows an API-first definition for REST APIs.
Lots of people talk about the benefits OpenAPI Specification (OAS) can bring to your documentation and testing efforts, but few people talk about the real complexities involved when you try to scale OpenAPI usage across a large organization. This talk is about how to scale your OAS usage, who should be using OAS, and what concrete steps you can take now to save lots of time later.
Finally, we’ll take a look at some real world API growing pains that we see at larger Stoplight customers, and their potential solutions.
As more and more companies are moving to the Cloud, they want their latest, greatest software features to be available to their users as quickly as they are built. However there are several issues blocking them from moving ahead.
One key issue is the massive amount of time it takes for someone to certify that the new feature is indeed working as expected and also to assure that the rest of the features will continuing to work. In spite of this long waiting cycle, we still cannot assure that our software will not have any issues. In fact, many times our assumptions about the user's needs or behavior might itself be wrong. But this long testing cycle only helps us validate that our assumptions works as assumed.
How can we break out of this rut & get thin slices of our features in front of our users to validate our assumptions early?
Most software organizations today suffer from what I call, the "Inverted Testing Pyramid" problem. They spend maximum time and effort manually checking software. Some invest in automation, but mostly building slow, complex, fragile end-to-end GUI test. Very little effort is spent on building a solid foundation of unit & acceptance tests.
This over-investment in end-to-end tests is a slippery slope. Once you start on this path, you end up investing even more time & effort on testing which gives you diminishing returns.
In this session Naresh Jain will explain the key misconceptions that has lead to the inverted testing pyramid approach being massively adopted, main drawbacks of this approach and how to turn your organization around to get the right testing pyramid.
Architecting an Enterprise API Management StrategyWSO2
A good internal and external API management strategy and architecture is key to building ecosystem platforms that lead to successful API economies in the enterprise. This workshop will look at best practices in API management using the WSO2 API Manager and Integration Platform products, which are used to rapidly implement RESTful design, enforce governance policies, safely scale solutions, orchestrate complex interaction sequences, and re-use assets. The session will also look at reference architectures and architectural recommendations of building large scale API ecosystems.
Director - Solutions Architecture at WSO2, Mifan Careem presented this session at APIdays Sydney 2015.
Swagger APIs for Humans and Robots (Gluecon)Tony Tam
Presentation to Gluecon 2014 about Swagger for API development and adoption of services. Reverb also announced the Swagger 2.0 Working Group, with Apigee as a founding member
Tracing Micro Services with OpenTracingHemant Kumar
Tracing in the world of micro services has become a standard with people using distributed tracers like Zipkin, Jaeger, Appdash etc. But, with so many different tracers, its confusing to choose one tracer and then painful to replace a tracer. That's where OpenTracing comes in. OT provides a consistent, vendor-neutral API to allow users to choose whatever distributed tracer they need and can change the tracer with just an O(1) operation.
API Management Solution Powerpoint Presentation SlidesSlideTeam
Select this API Management Solution PowerPoint Presentation Slides and study the needs of app developers. Display your company’s objectives like the expansion of the market base, building a platform ecosystem, and improving the digital outreach company through this application gateway PPT templates. Highlight the structure of architectural components of API with the help of this computing interface management PPT slide. You can easily introduce your services of API portal like documentation, registration, and analysis in a well-organized manner by taking the aid of our invigorating software management PPT designs. Take advantage of our professionally designed network administration PPT themes to exhibit various components like API design, deployment, security, analytics, and monetization in an appropriate color-coded fashion. You can take the assistance of this API solution PPT presentation to provide a report on API management in a well-organized format. Click the download button and make this open-source management PowerPoint presentation your source to educate prospective clients about attractive opportunities in the API management market. https://bit.ly/3tOpgMa
EuroPython 2017 - How to make money with your Python open-source projectMax Tepkeev
Developers create new open-source projects every day. As the project becomes popular they have to invest more and more time into it’s development and of course at some point a question arises: “How can I make some money with my project ?”
In this talk we will try to answer this question. We will talk about different models of making money, their pros and cons. We will concentrate on Python Open-Source projects mostly and try to answer the following questions:
What to sell ?
Where to sell ?
How to distribute ?
How to license ?
After this talk you will have a clear understanding of how you can make money with your project. What your next steps should be and how you can get the actual profit while still continuing making your customers happy.
EuroPython 2017 - PyData - Deep Learning your Broadband Network @ HOMEHONGJOO LEE
45 min talk about collecting home network performance measures, analyzing and forecasting time series data, and building anomaly detection system.
In this talk, we will go through the whole process of data mining and knowledge discovery. Firstly we write a script to run speed test periodically and log the metric. Then we parse the log data and convert them into a time series and visualize the data for a certain period.
Next we conduct some data analysis; finding trends, forecasting, and detecting anomalous data. There will be several statistic or deep learning techniques used for the analysis; ARIMA (Autoregressive Integrated Moving Average), LSTM (Long Short Term Memory).
This half-day tutorial introduces Protocol Buffers, gRPC, and the open source tools that Google uses to publish and support some of the world's biggest APIs. We'll show how the Protocol Buffer language allows APIs to be described, reviewed, and implemented in a programming-language independent way, how gRPC enables high-performance streaming APIs, and how \ a few simple conventions can enable related tools to serve robust REST APIs and generate production-quality client libraries in seven popular programming languages. This is API publishing the Google way, but large teams aren't required. With shared open-source tooling, even the smallest developer can build scalable, usable APIs that delight.
https://apistrat18.sched.com/event/FTR3/usable-apis-at-scale-with-protocol-buffers-and-grpc-tim-burks-andrew-gunsch-google
APIsecure - April 6 & 7, 2022
APIsecure is the world’s first conference dedicated to API threat management; bringing together breakers, defenders, and solutions in API security.
Securing APIs with Open Standards
Tips for makingandbreaking APIs that scale from theSynack Red Team
Ryan Rutan, Sr. Director of Community at Synack Red Team
Vitthal Shinde, Security Engineer at FICO & Synack Red Team
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays
apidays LIVE Helsinki - APIs, Platforms, And Ecosystems - Transforming Industries And Experiences
Implementing OpenAPI and GraphQL Services with gRPC
Tim Burks, Software Engineer at Google
Connexion is an open source API first REST framework for Python, built on top of Flask and based on OpenAPI/Swagger, targeted for microservice development. Connexion automagically handles request routing, oauth2 security, request validation and response serialization based on an OpenAPI 2.0 Specification file in YAML, so you don’t have to care about boilerplate anymore.
Because it is based on Flask it supports everything that Flask does, including deployment options and extensions.
At Zalando we’ve adopted “API First” as one of our key engineering principles, to ensure our API are robust, consistent, general and
abstracted from specific implementation and use cases. But when we tried to implement this principle for the first time we were faced with the lack of a python framework to achieve it in a easy fashion - there were several frameworks that produce a swagger definition from the
implementation but none that do it the other way around - so we decided to fill that gap.
Henning will show how to get started with OpenAPI+Connexion, present some real-world use cases and deployment options such as Kubernetes.
Enforcing API Design Rules for High Quality Code GenerationTim Burks
[Co-presented with Mike Kistler, Architect for SDK Generation for the Watson Client Libraries]
The OpenAPI Specification is emerging as the leading standard for describing REST APIs. A key factor in the popularity of OpenAPI is the broad array of open source tools that it enables that create, manipulate, and publish documentation and code from OpenAPI descriptions. In this talk, we describe a configurable and extensible open source linter for OpenAPI that we are using to solve API code generation problems at IBM and Google. Our linter is based on Gnostic, an open source framework for working with API descriptions that was developed at Google and is available on GitHub.
OpenAPI itself is language-agnostic and is being used to generate code in a large set of popular programming languages. This generated code includes both server-side "stubs" and client libraries that are sometimes called software development kits (SDKs). IBM has begun to employ code generation for the Watson Developer Cloud SDKs and other companies are doing similar things, including Google, which generates client libraries from Google-specific API description formats. These teams have found that the quality of SDKs generated from API descriptions depends heavily on the quality of the descriptions. This goes far beyond mere syntactic compliance with a specification -- it involves proper API design, naming, and adherence to organization-wide design patterns. To address this, many companies have created API design guides. Some companies, such as Google and Microsoft, have published their API design guides externally, while others like IBM have kept theirs as internal documents. But to this point, verifying compliance with an API design guide has largely been a manual task. What is needed, we believe, is a configurable and extensible linter to check OpenAPI descriptions for conformance with rules derived from API design guides.
DocDokuPLM : Domain Specific PaaS and Business Oriented API, OW2con'16, Paris. OW2
Totally replacing our SOAP web services with HTTP web services behind an API has been a real challenge for us this year. We made the choice to generate our Java and JavaScript API by using Swagger. Swagger allows us to generate a JSON file describing our REST layer services, and thus generate code from this description file. We're now able to deliver a SDK to other applications in Java and JavaScript today.
Using same codebase and same method names are really useful for developers, and modifying our REST layer doesn't mean modifying our SDKs by hand: it's generated! It's quite easy to deploy and/or use: our APIs are simply Maven and NodeJS modules. Having a interactive documentation for all SDKs is really appreciable, it allows us to discover every services and test them.
We can now resolve specific use-cases by developing new applications with this API. Currently our SDK is in use in 2 separate projects and languages (a GUI written with NodeWebkit and a JEE server application), and fits as needed.
Creating a successful API requires a proper process from concept and design, through development, and into ongoing maintenance and good developer support. There are many steps to a good API. As developer expectations for better-quality APIs increase, tools have made it easier to do this well. Looking at the full API Product Lifecycle to design an API people will use, Jeremy Glassenberg will share the newest tools -- and potentially upcoming opportunities -- to better automate the planning and creation of a solid developer program.
Practices and tools for building better API (JFall 2013)Peter Hendriks
Een belangrijke voorwaarde om goede en leesbare Java code te schrijven is om gebruik te maken van een goede API. Een goede API helpt ontwikkelaars om sneller hoogwaardige code te schrijven. Het ontwerp van een API is daarom belangrijk, zeker als er grotere systemen worden gerealiseerd in teamverband. Moderne ontwikkeltools als Eclipse, IntelliJ IDEA en FindBugs helpen met het schrijven van goede API, en het detecteren van slecht gebruik. Deze sessie gaat in op de laatste ontwikkelingen en mogelijkheden, inclusief nieuwe taalmogelijkheden in Java 8. Er wordt hierbij gebruik gemaakt van praktische situaties en concrete codevoorbeelden, gebaseerd op echte ervaringen in grote codebases. Met praktische tips en toegankelijke tools kan al een grote stap gemaakt worden om in de praktijk beter met API ontwerp om te gaan!
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Servicestevemock
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service.
A tutorial for building a science application using the Araport.org platform, specifically the Agave API's Profiles RESTful endpoints from the araport app generator platform.
Proposal to enhance the development and documentation of OSLC APIs using Swagger Tools and the OpenAPI specification.
Links to videos:
Slide 5 Swagger Codegen: https://1drv.ms/v/s!AnMSa6KFnUYAllGzUA9JOBIYp6hh?e=MUrZEQ
Slide 6 Swagger UI: https://1drv.ms/v/s!AnMSa6KFnUYAllIPjwLbYLR1Dma1?e=tJlLSc
Slide 21 Demo: https://1drv.ms/v/s!AnMSa6KFnUYAlnjWkWxknHMaLNnA?e=YP2hz5
How to Create the API Document from Real API and Localization Pronovix
Sometime, real API and documentation have deep groove. So I have decided to create document from real API request and response. At first, I have created swagger from API response. After that, I have published mkdocs documents from swagger.
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...Restlet
This workshop explained how to craft an API using the first multi-language dedicated Web IDE, host and scale the API with Platform as a Service for web APIs and manage access to this API; including: documentation, client SDKs, access management, firewall and analytics.
These slides focus on documentation for REST APIs. See http://idratherbewriting.com for more detail. For the video recording, see http://youtu.be/0yfNd7tzH2Q. This deep dive is the second slide deck I used in the presentation.
3D Printing by Python scripts and BlenderTakuro Wada
Presentation documents I talked at Blender Conference 2015 in Amsterdam. I talked about 3D model generation using Python API in Blender. I also have sample codes in github (https://github.com/kabuku/blender-python)
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
3. Agenda
3
1. What is OpenAPI?
Introduction and basics
2. OpenAPI tools
Introduce some tools to increase your productivity
3. Actual case study
Introduce our company’s project
5. What is OpenAPI?
OpenAPI is API description language which is focusing
on creating, evolving and promoting vendor neutral
description format
5
(Partially cited from https://www.openapis.org/about)
You can write your API spec with OpenAPI
6. What is OpenAPI?
‣ Supported spec format
- YAML and JSON
‣ Based on JSON schema
- Vocabulary to annotate and
validate JSON
‣ Originally known as Swagger
6
Actual example spec in YAML format
7. How to use OpenAPI?
‣As API documents
-Generate good looking documents
- Share API spec in team
- Frontend and Backend
- Developers and non-developers
- Public API Document for Any developers
7
8. How to use OpenAPI?
‣As API tools
-Code generation
- Codes for request data validation in server
- Code for API calling in clients
8
9. OpenAPI versions
‣OpenAPI is originally known as Swagger
- Swagger spec was renamed OpenAPI spec in 2016
9
Version Release Date
1.2 14 Mar 2014
2.0 8 Sep 2014
3.0 Will be released in July 2017
So Hot!!
https://www.openapis.org/specification/repo
10. OpenAPI’s competitors
‣RESTful API DL (Description Language)
-RAML (RESTful API Modeling Language)
- YAML base
-API Blueprint
- Markdown base
- Oracle acquired Apiary in Jan 2017
10
11. OpenAPI (Swagger) is gathering more attention than others!
Google Trends
So Hot!!
15. Core tools (1/3)
‣Swagger UI
- Show spec with beautiful format
- Directly API calling from browser
- http://petstore.swagger.io/
15
https://github.com/swagger-api/swagger-ui
16. Core tools (2/3)
‣Swagger Editor
-WYSIWYG Spec editor in web browser
- Syntax highlighting, Autocompletion, Real time spec validation
- http://editor.swagger.io/#/
16
https://github.com/swagger-api/swagger-editor
17. Core tools (3/3)
‣Swagger Codegen
-Generate server’s and client’s code from spec
17
Swagger
Spec
Generate
Multiple languages
Swagger
Codegen
Input
18. Community tools
‣ There are many Python tools
for OpenAPI
- Validator
- Code generator
- Spec parser
- Some tools are for the specific
framework
18
https://swagger.io/open-source-integrations/#python-19
19. bravado-core
‣ Python library that adds client-side and server-side support for
OpenAPI (2.7, 3.4+, developed by Yelp, https://github.com/Yelp/bravado-core)
‣ Not dedicated to any specific framework (You can use it in you own
project today)
‣ Very simple to use
‣ Features
- Validation
- Marshaling and Unmarshaling
- Custom formats for type conversion
19
21. bravado-core: (1)Validate
‣Validation execution
21
import yaml
from bravado_core.spec import Spec
# 1
with open('openapi.yaml', 'r') as f:
raw_spec = yaml.load(f)
# 2
spec = Spec.from_dict(raw_spec)
# 3
book = raw_spec[‘definitions']['Book']
# 4
validate_schema_object(spec, book, target)
1. Load YAML file with OpenAPI
spec (JSON is also OK)
2. Create Spec object
3. Retrieve “Book” definition
4. Validate (target is dict object
which is dumped from client’s
request)
22. bravado-core: (1)Validate
‣if required property “id” is not defined in dict:
22
validate_schema_object(spec, book, {})
Code
jsonschema.exceptions.ValidationError: 'id' is a required property
Failed validating 'required' in schema:
{'properties': {'author': {'type': 'string'},
'id': {'type': 'integer'},
'release_date': {'format': 'date', 'type': 'string'},
'title': {'type': 'string'}},
'required': ['id'],
'type': 'object',
'x-model': 'Book'}
On instance:
{}
Result
23. bravado-core: (1)Validation
‣If a property has invalid type value:
23
validate_schema_object(spec, book, {"id": 1, "title": 1})
Code
jsonschema.exceptions.ValidationError: 1 is not of type 'string'
Failed validating 'type' in schema['properties']['title']:
{'type': 'string'}
On instance['title']:
1
Result
24. bravado-core: (2)Unmarshal
‣Unmarshal (dict to object)
24
from bravado_core.unmarshal import unmarshal_schema_object
book_obj = unmarshal_schema_object(
spec, book,
{"id": 1,
"title": "Merchant of Venice”,
“author": "William Shakespeare"})
print(book_obj)
Code
]Dict need to be converted
Book(author='William Shakespeare', id=1, title='Merchant of Venice')
Result
Model object is created !!
25. bravado-core: (2)Unmarshal
‣Formatting in Unmarshal
25
Book:
type: object
required: [id]
properties:
id:
type: integer
title:
type: string
author:
type: string
release_date:
type: string
format: date
] This property is added and
expected to be string with “date" format
26. bravado-core: (2)Unmarshal
‣Formatting in Unmarshal
26
book_obj = unmarshal_schema_object(
spec, book,
{"id": 1,
"title": "Merchant of Venice”,
“author": "William Shakespeare”,
“release_date”: “2017-07-11”})
print(book_obj)
Code
]Dict need to be converted
Book(author='William Shakespeare', id=1,
release_date=datetime.date(2017, 7, 11), title='Merchant of Venice')
Result
String with date format is successfully converted to a date object!!
31. Project overview
‣Kabuku Connect
- Manufacturing cloud platform
- Connect people who want to make something and
the factories selected by AI
31
32. 32
‣Kabuku Connect
- Frontend: Angular (TypeScript)
- Backend: Python
Backend
ServerFrontend
API
Architecture
Other
ServiceAPI
‣Other services
- Manufacturing
management service
- Data analyzing service
Kabuku Connect
Other
Service
OpenAPI OpenAPI
35. Implementation workflow
1. Design
‣ API structure and write OpenAPI spec
35
2. Implementation
‣ Frontend (Angular, Typescript)
- Using generated clients code and mock server
‣ Backend (Python)
‣ Frontend and Backend can be implemented in parallel
36. Impression
‣Using OpenAPI tools decrease your
tasks so much
- Document generation
- Code generation
- Frontend and Backend, API provider and API
consumer can be implemented in parallel
36
Very
Productive!
38. Recap
‣OpenAPI is a hot technology to describe
API specification
38
‣There are many tools to increase your
productivity with OpenAPI
‣You learned actual case with OpenAPISo Hot!!
39. Required more contributors!
‣New Open API Spec (Version 3.0) will be
released in July 2017
-There are many added good features
-Tools need to support OAS v3
39
Let’s
Contribute!
40. We are hiring!
40
‣ Python Developer
‣ C++ Developer
‣ Frontend Developer
‣ Angular/Three.js
‣ You can use 3D printers all you want
‣ International members
‣ 3 Google Developer Experts
Some 3D printed members
https://www.kabuku.co.jp/en