Test Design and Automation for REST APIIvan Katunou
This document discusses test design and automation for REST API applications. It covers topics such as the characteristics of RESTful APIs, test design and coverage, and automation. For test design and coverage, it recommends testing endpoints, request methods, headers, bodies, response codes, headers, and bodies. It also discusses testing search, pagination, versioning, and more. For automation, it recommends tools like Postman, RestAssured, and using object mapping, builders, and JSON schema validation for test data. The presenter's contact information is provided at the end.
Understanding REST APIs in 5 Simple StepsTessa Mero
This document summarizes the 5 steps to understanding REST APIs: 1) Understanding the purpose of APIs and their importance and growth, 2) Learning that REST defines functions to communicate via HTTP verbs and nouns, 3) Knowing that APIs use requests and responses, 4) Relying on documentation as the reference, and 5) Using debugging and testing tools to prevent issues. It provides examples of requests, responses, API documentation, and tools like Postman for working with REST APIs.
This document provides an introduction and overview of REST APIs. It defines REST as an architectural style based on web standards like HTTP that defines resources that are accessed via common operations like GET, PUT, POST, and DELETE. It outlines best practices for REST API design, including using nouns in URIs, plural resource names, GET for retrieval only, HTTP status codes, and versioning. It also covers concepts like filtering, sorting, paging, and common queries.
The document discusses Swagger, an open source API documentation framework. It describes how Swagger is used to document REST APIs and provides an interactive UI. It then outlines how to add Swagger documentation to a Spring Boot project using Springfox, including adding dependencies, configuring Swagger, and annotating controllers. The document demonstrates how Swagger UI allows developers to easily view and test documented APIs in the browser.
Document your rest api using swagger - Devoxx 2015johannes_fiala
This session will show you how you can easily document your REST API's using Spring & Swagger.
It will show you how to use the Swagger-Spring integration in a Spring Boot application:
Setup a basic REST API using Spring-Boot together with Swagger-Springfox
Access and test the REST-API using the Swagger-UI client
Generate client code stubs for your language (e.g. Java, PHP, Python, ...) using Swagger-Codegen
Graphically display your REST-API using the Chrome plugin Swagger.ed
Devoxx Belgium Nov. 2015
The document discusses demystifying APIs. It begins with an introduction to APIs, including their evolution and benefits. It then discusses RESTful APIs and their key aspects like uniform interface and use of HTTP methods. The document outlines best practices for API design, development, and challenges. It provides examples of designing APIs using Node.js and Hapi.js and discusses challenges like security, authentication, rate limiting, and scalability. Tools mentioned include Express, Swagger, Postman, and Kong.
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.
This document provides an overview of a RESTful JSON API. It discusses that the API uses a REST design with JSON as the output format. It also describes other common protocols like SOAP and XML-RPC. The API is intended for use by desktop, mobile, and third-party web applications that can communicate over HTTP. Key aspects covered include input-output design, error handling, documentation, and user authentication using OAuth. The API implementation leverages the Sinatra framework with common logic modules to share data and configuration across applications. SDKs are also discussed to help integrate external apps with the API.
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
This document provides an introduction to API testing using Postman. It begins with a brief overview of APIs, including what they are, their history and common types. It then covers API testing in more detail, explaining what it is, common types of API tests and advantages/challenges. Next, it discusses common API protocols, HTTP request methods and response codes. Finally, it introduces Postman, describing its basic building blocks and providing a short demo. The overall purpose is to educate attendees on APIs and API testing using Postman.
This document discusses testing RESTful web services using REST Assured. It provides an overview of REST and HTTP methods like GET, POST, PUT, DELETE. It explains why API automation is required for early defect detection, contract validation, stopping builds on failure. REST Assured allows testing and validating REST services in Java and integrates with frameworks like JUnit and TestNG. It provides methods to format HTTP requests, send requests, validate status codes and response data. REST Assured also handles authentication mechanisms. The document provides instructions on adding the REST Assured Maven dependency and writing tests, including an example of a GET request.
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.
This document introduces Swagger, an open-source framework for describing, producing, consuming, and visualizing RESTful APIs. It provides a specification for describing APIs in a machine-readable format. Swagger allows automatically generating documentation from code and enabling tooling around REST APIs. The document discusses Swagger specifications, how to list and view API details, integration with various programming languages and frameworks, development and deployment processes, and alternatives to Swagger.
- REST (Representational State Transfer) uses HTTP requests to transfer representations of resources between clients and servers. The format of the representation is determined by the content-type header and the interaction with the resource is determined by the HTTP verb used.
- The four main HTTP verbs are GET, PUT, DELETE, and POST. GET retrieves a representation of the resource and is safe, while PUT, DELETE, and POST can modify the resource's state in atomic operations.
- Resources are abstract concepts acted upon by HTTP requests, while representations are the actual data transmitted in responses. The representation may or may not accurately reflect the resource's current state.
An introduction to api testing | David TzemachDavid Tzemach
WHAT IS API?
MOTIVATION TO TEST API
WHAT IS AN API TESTING?
WHAT TESTS SHOULD BE PERFORMED ON API’S
WHAT ARE THE TYPES OF DEFECTS THAT API TESTING WILL HELP REMOVE?
WHAT ARE THE CHALLENGES OF API TESTING?
Swagger: Restful documentation that won't put you to sleepTobias Coetzee
RESTful services are becoming more prevalent in the systems we build and interact with. One of the problems with RESTful services is documentation. The documentation is either non-existent, out-dated and useless or done in Word completed separate from the actual code. Keeping the documentation up to date is also boring.
Swagger.io gives you a way to overcome your RESTful service documentation problems by making your RESTful service’s documentation part of the code. Swagger.io gives you interactive documentation, i.e. no more boring Word documents, and the added bonuses of client SDK generation and discoverability.
OpenShift Origin: Build a PaaS Just Like Red HatsMark Atwood
Red Hat is introducing OpenShift Origin, an open source Platform as a Service (PaaS) based on the components of Red Hat's OpenShift product. OpenShift Origin allows users to deploy their own open source PaaS on their own infrastructure and customize it to meet their needs without vendor lock-in. It includes components for managing applications and containers as well as REST APIs and a command line client. Red Hat developed OpenShift Origin to share their PaaS technology openly via an open source project while still offering a hosted version as a product.
InVision is a collaborative design company that’s growing into Golang. That being said, when we started doing web services, we looked at using one of the middleware libraries out there such as Alice and Negroni. We found them all interesting but decided to tackle it on our own. As we did that we realized that our library was pretty cool so we broke it out and open sourced it as Rye. I’ll present on the approach we took and some of the benefits of using Rye including integration with Statsd, Context and custom middleware handlers we’ve added such as CIDR validation and JWT validation.
This document discusses using Swagger to document REST APIs. It begins by providing an overview of Swagger and its capabilities. It then discusses OpenAPI as the de facto standard and how Swagger was donated to the OpenAPI Initiative. The document provides tips on getting started with Swagger and considerations for using JSON or YAML formats. It also discusses best practices like taking an "API-first" approach and examples of using Swagger in real projects. It covers potential issues like code generation and incorporating Swagger UI.
A REST API uses HTTP requests with verbs like GET, POST, PUT, and DELETE to perform CRUD (Create, Read, Update, Delete) operations on resources identified by URLs. It provides a lightweight alternative to SOAP that returns data in JSON format and HTTP response codes. Well-known codes include 200 for OK, 201 for Created, 400 for Bad Request, and 404 for Not Found. REST enables building applications and platforms that can easily integrate new interfaces over time.
Applications increasingly talk to each other behind the scenes via APIs. Google’s recent acquisition of Apigee, an API management company, is an indicator of the continued importance of APIs. APIs are like building blocks, providing services and data that can be connected with other APIs to build powerful customized apps. However, developing and testing an API can be challenging because there is no built-in interface, breaking changes can cause widespread outages, sensitive data may be exposed or accessed, and accepted agile testing paradigms can be difficult to adapt to APIs. This session is an introduction to restful APIs and how to test them for security, performance, functionality, and backwards-compatibility risks.
Deploy and Access WebSphere Liberty and StrongLoop REST Endpoints on IBM BluemixArthur De Magalhaes
The document discusses API discovery capabilities in IBM WebSphere Liberty that allow aggregating and discovering REST APIs across applications. It describes how Liberty supports auto-generating Swagger documentation and providing a UI for exploring APIs. It also demonstrates integrating Liberty APIs with IBM API Connect for management and consumption of APIs across hybrid environments.
Get Your Node.js API Swaggering with OpenAPI SpecAdam Paxton
An overview of OpenAPI Spec, fka Swagger, as well as an example of how to use it when building a Node.js REST API.
Presented at Connect.tech Atlanta, September 21, 2017.
- The document introduces APIs and provides an overview of what they are, how they work, and strategies for testing APIs.
- It discusses RESTful principles, how HTTP requests and responses work, authentication methods like OAuth and JWT, and tools for testing APIs like Postman.
- Examples are given around making GET and POST requests to APIs and checking the status and response to demonstrate how APIs can be interacted with and tested.
This document provides an overview of building REST APIs for distributed systems. It discusses motivation for APIs and the importance of an API contract. The document then covers tools for defining the API contract like RAML and code generation. It presents microservices architecture and implementation options using Spring Boot, Spring Cloud, and Netflix OSS frameworks. The talk concludes with a demo of a microservices application deployed with Docker.
APIs distribuidos con alta escalabilidadSoftware Guru
This document provides an overview of building REST APIs for distributed systems. It discusses motivation for APIs and the importance of an API contract. The document then covers tools for defining the API contract like RAML. It presents microservices architecture and implementation options like Spring Boot, Spring Cloud and Netflix OSS. The talk concludes with a demo of a microservices application deployed with Docker.
Eran Stiller: API design in the modern era - architecture next 2020 CodeValue
APIs are at the heart of the modern software development world. Whether we author a distributed system, a microservices-based application, or a simple client-server n-tier application - our system will most probably expose an API at its core. APIs are a means to expose the functionality of a particular component to its users. Unsurprisingly, many formats for APIs have existed over the years, with the industry setting around RESTful APIs as the de-facto standard, with gRPC growing in popularity.
Join me in this session, as I review today's most popular API formats and their relative strengths and weaknesses. From REST, through OpenAPI, via gRPC and to the rising star of AsyncAPI - we'll explain how these API formats work and the tools they employ and offer some guidance as towards when we should use each. At the end of this session, you'll have a good familiarity with these formats, and you'll be in a much better position to choose between them.
API Design in the Modern Era - Architecture Next 2020Eran Stiller
APIs are at the heart of the modern software development world. Whether we author a distributed system, a microservices-based application, or a simple client-server n-tier application - our system will most probably expose an API at its core. APIs are a means to expose the functionality of a particular component to its users. Unsurprisingly, many formats for APIs have existed over the years, with the industry setting around RESTful APIs as the de-facto standard, with gRPC growing in popularity.
Join me in this session, as I review today's most popular API formats and their relative strengths and weaknesses. From REST, through OpenAPI, via gRPC and to the rising star of AsyncAPI - we'll explain how these API formats work and the tools they employ and offer some guidance as towards when we should use each. At the end of this session, you'll have a good familiarity with these formats, and you'll be in a much better position to choose between them.
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Petko Mikhailov
This document provides tips for documenting an API for the first time. It discusses what APIs are and the basics of REST APIs. It outlines what one needs to know about tools like OpenAPI Spec and Markdown when documenting an API. It also offers advice on determining minimum viable documentation and surviving the first API documentation assignment. Key steps include understanding the API, defining essential documentation, adding code examples, and establishing a review process.
Advanced Web Development in PHP - Understanding REST APIRasan Samarasinghe
ESOFT Metro Campus - Advanced Web Development in PHP - (Module VIII) Understanding REST API
(Template - Virtusa Corporate)
Resources: codeofaninja.com
Contents:
What is an API?
Comparing a website to an API
Classification of APIs
What is REST API?
What model does REST use?
REST HTTP Methods
HTTP Codes
The advantages of REST
What is CRUD?
CRUD Operations
CRUD Application Example
Simple REST API Implementation in PHP
Web root Folders and Files Structure
MySQL Database
Reading all Products
Reading one Product
Creating a Product
Updating a Product
Deleting a Product
Searching a Product
API Description Languages: Which Is The Right One For Me? ProgrammableWeb
The document discusses and compares different API description languages (APIs), including RAML and Swagger. It provides an overview of each tool's features and capabilities. The document also shares the author's experiences using RAML and Swagger to describe sample APIs. While both APIs are useful for documentation, the author found RAML better suited for designing APIs first before coding, while Swagger integrates more tightly with code.
This document provides an overview and agenda for a presentation on using the Splunk Java SDK. The presenter is introduced as a developer evangelist for Splunk. The agenda includes an overview of the Splunk platform, REST API and SDKs, a detailed look at the Java SDK, examples of using the SDK to log events, search data, and work with saved searches, and a discussion of ways to think outside the box when using Splunk with Java.
API Description Languages: Which is the Right One for Me?Akana
SOA Software Director of API Strategy, Laura Heritage, discusses new ways to describe and document APIs have emerged such as Swagger, RAML, API Blueprint and others, each taking a slightly different approach. Please join us in this webinar to hear how these description languages differ and how to choose right one for your API.
AI Chatbot Development – A Comprehensive Guide .pdfayushiqss
Discover how generative AI is transforming IT development in this blog. Learn how using AI software development, artificial intelligence tools, and generative AI tools can lead to smarter, faster, and more efficient software creation. Explore real-world applications and see how these technologies are driving innovation and cutting costs in IT development.
Participants explored how visual and functional coherence strengthened brand identity and streamlined development in this session. They learned to maintain consistency across platforms and enhance user experiences using Design Systems. Ideal for brand designers, UI/UX designers, developers, and product managers who sought to optimize efficiency and ensure consistency across projects.
Discover Passkeys, the next evolution in secure login methods that eliminate traditional password vulnerabilities. Learn about the CBSecurity Passkeys module's installation, configuration, and integration into your application to enhance security.
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsEstuary Flow
Unlock the full potential of your data by effortlessly migrating from PostgreSQL to Snowflake, the leading cloud data warehouse. This comprehensive guide presents an easy-to-follow 8-step process using Estuary Flow, an open-source data operations platform designed to simplify data pipelines.
Discover how to seamlessly transfer your PostgreSQL data to Snowflake, leveraging Estuary Flow's intuitive interface and powerful real-time replication capabilities. Harness the power of both platforms to create a robust data ecosystem that drives business intelligence, analytics, and data-driven decision-making.
Key Takeaways:
1. Effortless Migration: Learn how to migrate your PostgreSQL data to Snowflake in 8 simple steps, even with limited technical expertise.
2. Real-Time Insights: Achieve near-instantaneous data syncing for up-to-the-minute analytics and reporting.
3. Cost-Effective Solution: Lower your total cost of ownership (TCO) with Estuary Flow's efficient and scalable architecture.
4. Seamless Integration: Combine the strengths of PostgreSQL's transactional power with Snowflake's cloud-native scalability and data warehousing features.
Don't miss out on this opportunity to unlock the full potential of your data. Read & Download this comprehensive guide now and embark on a seamless data journey from PostgreSQL to Snowflake with Estuary Flow!
Try it Free: https://dashboard.estuary.dev/register
Lots of bloggers are using Google AdSense now. It’s getting really popular. With AdSense, bloggers can make money by showing ads on their websites. Read this important article written by the experienced designers of the best website designing company in Delhi –
In this session, we discussed the critical need for comprehensive backups across all aspects of our industry—from code and databases to webservers, file servers, and network configurations. Emphasizing the importance of proactive measures, attendees were urged to ensure their backup systems were tested through restoration processes. The session underscored the risk of discovering backup issues only during crises, highlighting the necessity of verifying backup integrity through restoration tests.
A captivating AI chatbot PowerPoint presentation is made with a striking backdrop in order to attract a wider audience. Select this template featuring several AI chatbot visuals to boost audience engagement and spontaneity. With the aid of this multi-colored template, you may make a compelling presentation and get extra bonuses. To easily elucidate your ideas, choose a typeface with vibrant colors. You can include your data regarding utilizing the chatbot methodology to the remaining half of the template.
YouTube SEO Mastery ......................islamiato717
### Introduction
#### The Importance of YouTube SEO
In the digital age, video content has emerged as a dominant force, capturing the attention of billions of people worldwide. YouTube, the second largest search engine after Google, plays a crucial role in this landscape. With over 2 billion logged-in monthly users and more than a billion hours of video watched each day, YouTube is a platform of immense potential for content creators, businesses, and influencers alike.
However, simply uploading videos isn't enough to harness this potential. To stand out amidst the vast sea of content, your videos must be discoverable. This is where YouTube SEO (Search Engine Optimization) comes into play. YouTube SEO is the practice of optimizing your videos, playlists, and channel to rank higher in YouTube's search results, thereby increasing visibility and attracting more viewers.
Understanding and implementing YouTube SEO is not just about getting more views; it's about reaching the right audience. By ensuring your content appears in relevant searches, you can connect with viewers who are genuinely interested in your message, products, or services. This targeted approach can lead to higher engagement, more subscribers, and ultimately, greater success on the platform.
#### Why SEO Matters for YouTube
Search Engine Optimization (SEO) has long been a critical component of online success, predominantly associated with websites and Google searches. However, its principles are equally vital for video content. YouTube’s algorithm considers various factors when ranking videos, including relevance, engagement, watch time, and click-through rate (CTR). By understanding and leveraging these factors, you can improve your video's position in search results and recommended lists.
High-ranking videos are more likely to be seen, clicked on, and watched. This visibility not only boosts your immediate views but also contributes to long-term growth. As your channel gains traction, the algorithm rewards you with more exposure, creating a positive feedback loop that can propel you to new heights.
#### The Impact of High-Ranking Videos on Business and Personal Brands
For businesses, a well-executed YouTube SEO strategy can drive traffic to your website, increase product awareness, and enhance customer engagement. Video content allows you to showcase products, provide tutorials, and share customer testimonials in a compelling and easily digestible format. High-ranking videos can lead to higher conversion rates and ultimately, more sales.
For personal brands and influencers, visibility on YouTube translates to greater influence and authority within your niche. It opens up opportunities for sponsorships, collaborations, and monetization. As you build a loyal audience, you can leverage this platform to expand your reach and establish yourself as a thought leader.
#### Overview of YouTube SEO
This book is designed to be a comprehensive guide to mastering YouTube SEO. We will
Break data silos with real-time connectivity using Confluent Cloud Connectorsconfluent
Connectors integrate Apache Kafka® with external data systems, enabling you to move away from a brittle spaghetti architecture to one that is more streamlined, secure, and future-proof. However, if your team still spends multiple dev cycles building and managing connectors using just open source Kafka Connect, it’s time to consider a faster and cost-effective alternative.
Ansys Mechanical enables you to solve complex structural engineering problems and make better, faster design decisions. With the finite element analysis (FEA) solvers available in the suite, you can customize and automate solutions for your structural mechanics problems and parameterize them to analyze multiple design scenarios. Ansys Mechanical is a dynamic tool that has a complete range of analysis tools.
Explore the rapid development journey of TryBoxLang, completed in just 48 hours. This session delves into the innovative process behind creating TryBoxLang, a platform designed to showcase the capabilities of BoxLang by Ortus Solutions. Discover the challenges, strategies, and outcomes of this accelerated development effort, highlighting how TryBoxLang provides a practical introduction to BoxLang's features and benefits.
Discover BoxLang, the innovative JVM programming language developed by Ortus Solutions. Designed to harness the power of the Java Virtual Machine, BoxLang offers a modern approach to application development with robust performance and scalability. Join us as we explore the capabilities of BoxLang, its syntax, and how it enhances productivity in software development.
IN Dubai [WHATSAPP:Only (+971588192166**)] Abortion Pills For Sale In Dubai** UAE** Mifepristone and Misoprostol Tablets Available In Dubai** UAE
CONTACT DR. SINDY Whatsapp +971588192166* We Have Abortion Pills / Cytotec Tablets /Mifegest Kit Available in Dubai** Sharjah** Abudhabi** Ajman** Alain** Fujairah** Ras Al Khaimah** Umm Al Quwain** UAE** Buy cytotec in Dubai +971588192166* '''Abortion Pills near me DUBAI | ABU DHABI|UAE. Price of Misoprostol** Cytotec” +971588192166* ' Dr.SINDY ''BUY ABORTION PILLS MIFEGEST KIT** MISOPROSTOL** CYTOTEC PILLS IN DUBAI** ABU DHABI**UAE'' Contact me now via What's App… abortion pills in dubai Mtp-Kit Prices
abortion pills available in dubai/abortion pills for sale in dubai/abortion pills in uae/cytotec dubai/abortion pills in abu dhabi/abortion pills available in abu dhabi/abortion tablets in uae
… abortion Pills Cytotec also available Oman Qatar Doha Saudi Arabia Bahrain Above all** Cytotec Abortion Pills are Available In Dubai / UAE** you will be very happy to do abortion in Dubai we are providing cytotec 200mg abortion pills in Dubai** UAE. Medication abortion offers an alternative to Surgical Abortion for women in the early weeks of pregnancy. We only offer abortion pills from 1 week-6 Months. We then advise you to use surgery if it's beyond 6 months. Our Abu Dhabi** Ajman** Al Ain** Dubai** Fujairah** Ras Al Khaimah (RAK)** Sharjah** Umm Al Quwain (UAQ) United Arab Emirates Abortion Clinic provides the safest and most advanced techniques for providing non-surgical** medical and surgical abortion methods for early through late second trimester** including the Abortion By Pill Procedure (RU 486** Mifeprex** Mifepristone** early options French Abortion Pill)** Tamoxifen** Methotrexate and Cytotec (Misoprostol). The Abu Dhabi** United Arab Emirates Abortion Clinic performs Same Day Abortion Procedure using medications that are taken on the first day of the office visit and will cause the abortion to occur generally within 4 to 6 hours (as early as 30 minutes) for patients who are 3 to 12 weeks pregnant. When Mifepristone and Misoprostol are used** 50% of patients complete in 4 to 6 hours; 75% to 80% in 12 hours; and 90% in 24 hours. We use a regimen that allows for completion without the need for surgery 99% of the time. All advanced second trimester and late term pregnancies at our Tampa clinic (17 to 24 weeks or greater) can be completed within 24 hours or less 99% of the time without the need for surgery. The procedure is completed with minimal to no complications. Our Women's Health Center located in Abu Dhabi** United Arab Emirates** uses the latest medications for medical abortions (RU-486** Mifeprex** Mifegyne** Mifepristone** early options French abortion pill)** Methotrexate and Cytotec (Misoprostol). The safety standards of our Abu Dhabi** United Arab Emirates Abortion Doctors remain unparalleled. They consistently maintain the lowest complication rates throughout the nation. Our
1. Design & Develop a REST API
with OpenAPI, Swagger, NodeJS
Luigi Saetta
Oracle Cloud Architect
1
2. REST API
• Everything is modeled as a RESOURCE
• Every resource is uniquely identified by a URI
• For example:
• /floor1/devices/dev1
• /floor1/lights/light1
• First of all, you want CRUD for RESOURCES (Create, Read, Update…)
• You use HTTP verbs to define the operations on resources
• GET: read the state
• POST: create a resource
• PUT: update the resource
• DELETE: the resource
2
3. Protocols
• Normally, a REST API is based on HTTP/HTTPS
• But, for example in the IoT World, you can have other protocols
• For example
• CoAP: Constrained Application Protocol, that is modeled after REST, but is a
binary (non Text) protocol based on UDP (not TCP as HTTP)
• In the constrained world of IoT devices HTTP is not always the best choice, is
too much verbose (bandwidth) and requires CPU (i.e.: battery power)
3
4. Discover and Describe an API
• Today, the emerging way for developing Systems and Applications is
MICROSERVICES
• An evolution of SOA
• You can develop the most beautiful API, but then you need to
document it for developers (of the clients)… and no-one wants to
write docs
• In SOA World Services were described using WSDL: a machine
readable language
• You were able to find endpoint for services and operations
• You were able to understand input parameters and response format
• You were able to generate clients with tools
4
5. Discover and Describe an API (2)
• Now, the most common way for an API is REST
• Over HTTP, usually the serialization format is JSON
• But, we still need a way to describe, document an API
• Maybe a way easier than WSDL and XML schema
• We need a way to discover what services are available, what
operations and what format for input and output
• Here, Swagger comes !
5
6. Swagger 101
• The idea is to describe a REST API in a Human and Machine Readable
Format
• You describe your API with a single file
• You can choose YAML
• You can use JSON
• The specification has been defined in a way that it is easy to develop
Open Source tools (and commercial tools)
• To parse Swagger descriptions
• To create server and client scaffold’s code from documentation
• To automatically generate documentation from code
• To generate a UI where you can access documentation and test API
6
8. OpenAPI
• Swagger 2.0 has been donated and has become Open API
• “Open API Initiative is focused on creating, evolving and promoting a
vendor neutral API Description Format based on the Swagger
Specification”
• https://www.openapis.org/
• The latest version of the spec can be found on GitHUB
• https://github.com/OAI/OpenAPI-Specification
8
10. Swagger Framework
• You can edit your swagger documentation file using Swagger Editor
• You can use the online version:
• http://editor.swagger.io/#/
• Or download it
• From the editor you can
• Generate server code
• Generate client code
10
11. Swagger UI
• It allows you to easily interact with your API
• It is auto-magically generated from your Swagger spec
• It enables you to see the operations available and to test it
11
13. Swagger in NodeJS
• To install swagger tools and modules for Node
• npm install -g swagger
• To create the starting skeleton for a project
• swagger project create homeauto
• cd homeauto
• To start executing the API
• swagger project start
• To start editing the SWAGGER Yaml (in your browser)
• swagger project edit
13
16. API and IoT
• Scenario: a Home/Building Automation solution
• You need an Hub/Gateway, or a set of them
• Protocol translation (ZigBee, ZWAVE, Bluetooth)
• Message Broker (MQTT)
• Field Gateway towards IoT Cloud Service
• If you want to access from some applications functionalities and data
on the gateway you need a REST API
• I’m currently investigating the advantages of using Swagger to design
and develop the REST API
16
17. Swagger and Oracle
• Oracle API Catalog Cloud Service contains a list of API offered by SaaS
and PaaS services
• It can be freely accessed (no fee)
• For each API you can access the Swagger spec (in JSON)
• https://apicatalog.oraclecloud.com/ui/
• You can run NodeJS and swagger tools inside a Docker Container in
Oracle Container Cloud Service
17