SlideShare a Scribd company logo
Asp.Net Core API
With Swagger
Implemented Swagger with Asp.Net Core 2.0 application with
onion architecture.
Presented By:
Abhinav Jha
14th March 2018
What is swagger. Why we need it?
Swagger is the world’s largest framework of API developer tools for the OpenAPI
Specification(OAS), enabling development across the entire API lifecycle, from design
and documentation, to test and deployment.
When consuming a Web API, understanding its various methods can be challenging for
a developer.
Swagger, also known as Open API, solves the problem of generating useful
documentation and help pages for Web APIs.
It provides benefits such as interactive documentation, client SDK generation, and API
discoverability.
I am using Swashbuckle.AspNetCore for my .Net Core 2.0 api to create its
documentation dynamically.
What do we need?
From the Package Manager Console window:
~ Install-Package Swashbuckle.AspNetCore
From the Manage NuGet Packages dialog:
● Right-click your project in Solution Explorer > Manage NuGet Packages.
● Set the Package source to "nuget.org".
● Enter "Swashbuckle.AspNetCore" in the search box.
● Select the "Swashbuckle.AspNetCore" package from the Browse tab and click
Install.
Implementation
Configuring Swagger
Configure Middleware
Register the Swagger generator, defining one or more Swagger documents
using Swashbuckle.AspNetCore.Swagger;
Enabling Swagger
Execution
Running Application.
Swagger UI
Swagger UI API Documentation
Swagger UI Model Declaration
Advantages Of Swagger
● It's comprehensible for developers and non-developers. Product managers,
partners, and even potential clients can have input into the design of your API,
because they can see it clearly mapped out in this friendly UI.
● It's human readable and machine readable. This means that not only can this
be shared with your team internally, but the same documentation can be used to
automate API-dependent processes.
● It's easily adjustable. This makes it great for testing and debugging API
problems.
References
To dig into the power of swagger refer these links for upcoming features.
Official Site:
https://swagger.io/
Swashbuckle.AspNetCore:
https://github.com/domaindrivendev/Swashbuckle.AspNetCore
Microsoft Documentation:
https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-
swashbuckle?tabs=visual-studio%2Cvisual-studio-xml
Project onion with swagger

More Related Content

What's hot

How to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hoursHow to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hours
Jane Chung
 
Swagger 2.0: Latest and Greatest
Swagger 2.0: Latest and GreatestSwagger 2.0: Latest and Greatest
Swagger 2.0: Latest and Greatest
LaunchAny
 
Swagger in the API Lifecycle
Swagger in the API LifecycleSwagger in the API Lifecycle
Swagger in the API Lifecycle
Ole Lensmar
 
API Design first with Swagger
API Design first with SwaggerAPI Design first with Swagger
API Design first with Swagger
Tony Tam
 
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
Restlet
 
A Tour of Swagger for APIs
A Tour of Swagger for APIsA Tour of Swagger for APIs
A Tour of Swagger for APIs
Allen Dean
 
Up & running with ECMAScript6
Up & running with ECMAScript6Up & running with ECMAScript6
Up & running with ECMAScript6
Nir Kaufman
 
Webpack and angularjs
Webpack and angularjsWebpack and angularjs
Webpack and angularjs
Nir Kaufman
 
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Caktus Group
 
Design Driven API Development
Design Driven API DevelopmentDesign Driven API Development
Design Driven API Development
Sokichi Fujita
 
How to Extend Audience Targeting (Liferay 6.2)
How to Extend Audience Targeting (Liferay 6.2)How to Extend Audience Targeting (Liferay 6.2)
How to Extend Audience Targeting (Liferay 6.2)
Julio Camarero
 
Writer APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorWriter APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger Inflector
Tony Tam
 
Leverage OSGI to create Extensible plugins for Liferay 6.2
Leverage OSGI to create Extensible plugins for Liferay 6.2Leverage OSGI to create Extensible plugins for Liferay 6.2
Leverage OSGI to create Extensible plugins for Liferay 6.2
Julio Camarero
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessible
Victor Trakhtenberg
 
A Starters Guide to Building APIs with Javascript
A Starters Guide to Building APIs with JavascriptA Starters Guide to Building APIs with Javascript
A Starters Guide to Building APIs with Javascript
All Things Open
 
20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
Kun-Neng Hung
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJS
Luigi Saetta
 
Angular 2.0
Angular 2.0Angular 2.0
Angular 2.0
THanekamp
 
Building APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerBuilding APIs with Node.js and Swagger
Building APIs with Node.js and Swagger
Jeremy Whitlock
 
Mongo db at_customink
Mongo db at_custominkMongo db at_customink
Mongo db at_customink
Nathen Harvey
 

What's hot (20)

How to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hoursHow to build a Whatsapp clone in 2 hours
How to build a Whatsapp clone in 2 hours
 
Swagger 2.0: Latest and Greatest
Swagger 2.0: Latest and GreatestSwagger 2.0: Latest and Greatest
Swagger 2.0: Latest and Greatest
 
Swagger in the API Lifecycle
Swagger in the API LifecycleSwagger in the API Lifecycle
Swagger in the API Lifecycle
 
API Design first with Swagger
API Design first with SwaggerAPI Design first with Swagger
API Design first with Swagger
 
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
 
A Tour of Swagger for APIs
A Tour of Swagger for APIsA Tour of Swagger for APIs
A Tour of Swagger for APIs
 
Up & running with ECMAScript6
Up & running with ECMAScript6Up & running with ECMAScript6
Up & running with ECMAScript6
 
Webpack and angularjs
Webpack and angularjsWebpack and angularjs
Webpack and angularjs
 
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
 
Design Driven API Development
Design Driven API DevelopmentDesign Driven API Development
Design Driven API Development
 
How to Extend Audience Targeting (Liferay 6.2)
How to Extend Audience Targeting (Liferay 6.2)How to Extend Audience Targeting (Liferay 6.2)
How to Extend Audience Targeting (Liferay 6.2)
 
Writer APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger InflectorWriter APIs in Java faster with Swagger Inflector
Writer APIs in Java faster with Swagger Inflector
 
Leverage OSGI to create Extensible plugins for Liferay 6.2
Leverage OSGI to create Extensible plugins for Liferay 6.2Leverage OSGI to create Extensible plugins for Liferay 6.2
Leverage OSGI to create Extensible plugins for Liferay 6.2
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessible
 
A Starters Guide to Building APIs with Javascript
A Starters Guide to Building APIs with JavascriptA Starters Guide to Building APIs with Javascript
A Starters Guide to Building APIs with Javascript
 
20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
20210411 全端網頁開發起手式:建構並佈署Angular網頁應用程式至GCP
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJS
 
Angular 2.0
Angular 2.0Angular 2.0
Angular 2.0
 
Building APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerBuilding APIs with Node.js and Swagger
Building APIs with Node.js and Swagger
 
Mongo db at_customink
Mongo db at_custominkMongo db at_customink
Mongo db at_customink
 

Similar to Project onion with swagger

Learn Spring Boot With Bisky - Swagger
Learn Spring Boot With Bisky - SwaggerLearn Spring Boot With Bisky - Swagger
Learn Spring Boot With Bisky - Swagger
MarshallChabaga
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
sarah david
 
Top 10 PWA Frameworks in 2020
Top 10 PWA Frameworks in 2020Top 10 PWA Frameworks in 2020
Top 10 PWA Frameworks in 2020
Devathon
 
Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023
ZimbleCodeAustralia
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
RyanForeman5
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdf
Knoldus Inc.
 
Swagger UI
Swagger UISwagger UI
Swagger UI
Walaa Hamdy Assy
 
44779e8c 5b7c-0010-82c7-eda71af511fa
44779e8c 5b7c-0010-82c7-eda71af511fa44779e8c 5b7c-0010-82c7-eda71af511fa
44779e8c 5b7c-0010-82c7-eda71af511fa
Nagendra Babu
 
Django vs laravel
Django vs laravelDjango vs laravel
Django vs laravel
Mindfire LLC
 
Unlocking Data for Analysts & Developers
Unlocking Data for Analysts & DevelopersUnlocking Data for Analysts & Developers
Unlocking Data for Analysts & Developers
Simone Stanich
 
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
flufftailshop
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
Ashley Roach
 
Swagger / Quick Start Guide
Swagger / Quick Start GuideSwagger / Quick Start Guide
Swagger / Quick Start Guide
Andrii Gakhov
 
Swagger
SwaggerSwagger
Api-First service design
Api-First service designApi-First service design
Api-First service design
Stefaan Ponnet
 
Top 20 AngularJS Development Tools That Developers Should Know In 2022
Top 20 AngularJS Development Tools That Developers Should Know In 2022Top 20 AngularJS Development Tools That Developers Should Know In 2022
Top 20 AngularJS Development Tools That Developers Should Know In 2022
simonedaniels3
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
75waytechnologies
 
Streamlining API with Swagger.io
Streamlining API with Swagger.ioStreamlining API with Swagger.io
Streamlining API with Swagger.io
Victor Augusteo
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
Hamed Hatami
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
Bhavesh Surani
 

Similar to Project onion with swagger (20)

Learn Spring Boot With Bisky - Swagger
Learn Spring Boot With Bisky - SwaggerLearn Spring Boot With Bisky - Swagger
Learn Spring Boot With Bisky - Swagger
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
 
Top 10 PWA Frameworks in 2020
Top 10 PWA Frameworks in 2020Top 10 PWA Frameworks in 2020
Top 10 PWA Frameworks in 2020
 
Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023Top Backend Frameworks for Mobile App Development in 2023
Top Backend Frameworks for Mobile App Development in 2023
 
Java Development Company | Xicom
Java Development Company | XicomJava Development Company | Xicom
Java Development Company | Xicom
 
Swagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdfSwagger With REST APIs.pptx.pdf
Swagger With REST APIs.pptx.pdf
 
Swagger UI
Swagger UISwagger UI
Swagger UI
 
44779e8c 5b7c-0010-82c7-eda71af511fa
44779e8c 5b7c-0010-82c7-eda71af511fa44779e8c 5b7c-0010-82c7-eda71af511fa
44779e8c 5b7c-0010-82c7-eda71af511fa
 
Django vs laravel
Django vs laravelDjango vs laravel
Django vs laravel
 
Unlocking Data for Analysts & Developers
Unlocking Data for Analysts & DevelopersUnlocking Data for Analysts & Developers
Unlocking Data for Analysts & Developers
 
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 
Swagger / Quick Start Guide
Swagger / Quick Start GuideSwagger / Quick Start Guide
Swagger / Quick Start Guide
 
Swagger
SwaggerSwagger
Swagger
 
Api-First service design
Api-First service designApi-First service design
Api-First service design
 
Top 20 AngularJS Development Tools That Developers Should Know In 2022
Top 20 AngularJS Development Tools That Developers Should Know In 2022Top 20 AngularJS Development Tools That Developers Should Know In 2022
Top 20 AngularJS Development Tools That Developers Should Know In 2022
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
 
Streamlining API with Swagger.io
Streamlining API with Swagger.ioStreamlining API with Swagger.io
Streamlining API with Swagger.io
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
 

Recently uploaded

SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Semiosis Software Private Limited
 

Recently uploaded (20)

SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
 

Project onion with swagger

  • 1. Asp.Net Core API With Swagger Implemented Swagger with Asp.Net Core 2.0 application with onion architecture. Presented By: Abhinav Jha 14th March 2018
  • 2. What is swagger. Why we need it? Swagger is the world’s largest framework of API developer tools for the OpenAPI Specification(OAS), enabling development across the entire API lifecycle, from design and documentation, to test and deployment. When consuming a Web API, understanding its various methods can be challenging for a developer. Swagger, also known as Open API, solves the problem of generating useful documentation and help pages for Web APIs. It provides benefits such as interactive documentation, client SDK generation, and API discoverability. I am using Swashbuckle.AspNetCore for my .Net Core 2.0 api to create its documentation dynamically.
  • 3. What do we need? From the Package Manager Console window: ~ Install-Package Swashbuckle.AspNetCore From the Manage NuGet Packages dialog: ● Right-click your project in Solution Explorer > Manage NuGet Packages. ● Set the Package source to "nuget.org". ● Enter "Swashbuckle.AspNetCore" in the search box. ● Select the "Swashbuckle.AspNetCore" package from the Browse tab and click Install.
  • 5. Configure Middleware Register the Swagger generator, defining one or more Swagger documents using Swashbuckle.AspNetCore.Swagger;
  • 9. Swagger UI API Documentation
  • 10. Swagger UI Model Declaration
  • 11. Advantages Of Swagger ● It's comprehensible for developers and non-developers. Product managers, partners, and even potential clients can have input into the design of your API, because they can see it clearly mapped out in this friendly UI. ● It's human readable and machine readable. This means that not only can this be shared with your team internally, but the same documentation can be used to automate API-dependent processes. ● It's easily adjustable. This makes it great for testing and debugging API problems.
  • 12. References To dig into the power of swagger refer these links for upcoming features. Official Site: https://swagger.io/ Swashbuckle.AspNetCore: https://github.com/domaindrivendev/Swashbuckle.AspNetCore Microsoft Documentation: https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with- swashbuckle?tabs=visual-studio%2Cvisual-studio-xml