Тёмный
No video :(

REST API Documentation using Swagger2 in Spring Boot | Tech Primers 

Tech Primers
Подписаться 135 тыс.
Просмотров 167 тыс.
50% 1

This video covers how to integrate Swagger 2 UI for REST API Documentation in Spring Boot.
🔗GitHub Link for the code: github.com/Tec...
📌 Related Playlist
================
🔗Spring Boot Primer - • Spring Boot Primer
🔗Spring Cloud Primer - • Spring Cloud Primer
🔗Spring Microservices Primer - • Spring Microservices P...
🔗Spring JPA Primer - • Spring JPA Primer
🔗Java 8 Streams - • Java 8 Streams
🔗Spring Security Primer - • Spring Security Primer
🔗Containers Primer - • Containers Primer
🔗Kubernetes Primer - • Kubernetes Primer
🔗AWS Primer - • AWS Primer
💥Join TechPrimers Slack Community: bit.ly/JoinTec...
💥Telegram: t.me/TechPrimers
💥TechPrimer HindSight (Blog): / techprimers
💥Website: techprimers.com
💥Slack Community: techprimers.sl...
💥Twitter: / techprimers
💥Facebook: TechPrimers
💥GitHub: github.com/Tec... or techprimers.gi...
🎬Video Editing: iMovie
🎼Background Music: Broke For Free - Day Bird
brokeforfree.b...
The Passion HiFi - What We Came To Do
---------------------------------------------------------------
🔥 Disclaimer/Policy:
The content/views/opinions posted here are solely mine and the code samples created by me are open sourced.
You are free to use the code samples in Github after forking and you can modify it for your own use.
All the videos posted here are copyrighted. You cannot re-distribute videos on this channel in other channels or platforms.
#Swagger2 #SpringBoot #TechPrimers

Опубликовано:

 

5 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 178   
@rohitkr.maurya6917
@rohitkr.maurya6917 5 лет назад
Your video is like any beginner can easily understand....Thanks for your effort
@muks
@muks 6 лет назад
Dude, Few points 1. The background is really awesome, 2. I really learned some good stuff although I know swagger2, 3. You need to explain in the swaggerConfig what is regex and how did you coded for it? because default paths only accepts the PathSelectors, 4. Some of the attributes have changed For e.g. description for @Api OR ApiInfo constructor args have changed but i guess you are unable to update the videos which is understood considering the vast no. of videos you are making, 5. Hands down very good videos for anybody to keep learning. Thanks a lot.
@ItamarLev
@ItamarLev 5 лет назад
great tutorial! after days and days of looking for a good explanation you did it in less than half an hour. thank you!
@TechPrimers
@TechPrimers 5 лет назад
Cheers mate
@sateeshkumar-sy2pc
@sateeshkumar-sy2pc 6 лет назад
Explained in a very simple way. Tried once and executed. That's all.... Thank you...
@muzammilsiddique2821
@muzammilsiddique2821 5 лет назад
This session is a great learning guide for generating API documentation from Spring boot project. Please plan a session on building API documentation from swagger editor and then build an API based on that documentation
@andrzejokon1517
@andrzejokon1517 6 лет назад
I use all technologies you talk about in your videos:) Great tutorial. Thank you.
@TechPrimers
@TechPrimers 6 лет назад
+The Hedgo thanks dudr
@suddewar
@suddewar 5 лет назад
Explained in very clean and precise way. Thanks
@maxlimgj
@maxlimgj 5 лет назад
Awesome explaination! Looking forward to more content
@invisibler3
@invisibler3 2 года назад
simple and nice explanation step by step
@kev18284
@kev18284 5 лет назад
Very clean and precise tutorial!
@dakshu11
@dakshu11 3 года назад
Thanks for the tutorial, my rest api just accepts query parameter i.e ?param = value, so I don't want swagger to ask for any parameters, how can I do that.. Plz help
@VIGNESHRUpendiran
@VIGNESHRUpendiran 7 лет назад
Wow,you again proveed buddy,i learned new things from u...I gave u thumpsup..Keep rocking...
@TechPrimers
@TechPrimers 7 лет назад
+VIGNESH R thank you Vignesh. Happy Learning
@78tomke
@78tomke 6 лет назад
Thanks, mate. It was a pleasure to watch it. Excellent job very informative ;)
@photo_lab4095
@photo_lab4095 6 лет назад
Great Tech Primers good job please make more video on Rest Webservices with Spring Rest WebServices
@TechPrimers
@TechPrimers 6 лет назад
sure ramjeet. any specific usecase you want me to cover?
@photo_lab4095
@photo_lab4095 6 лет назад
Recently I attend one interview he asked me to represet the EntityEndPoint in Rest API but I didn't get the question it self so I want to learn besic Rest Full or Spring Rest webservice with example. & Thanks for response.
@TechPrimers
@TechPrimers 6 лет назад
EntityEndPoint is the Endpoint exposing your entity(eg Users).
@mohamedgoher9727
@mohamedgoher9727 5 лет назад
The video is neat and untidy
@yogeshchaudhari9971
@yogeshchaudhari9971 5 лет назад
amazing knowledgeable video... thank you so much
@nitsbobby
@nitsbobby 6 лет назад
Good Video and very easy to understand. Thanks for this tutorial. Thanks Bro.
@Premkumar-ln7gt
@Premkumar-ln7gt 5 лет назад
simple and easy....thanks sir ji..
@Rishi_Ventrapati
@Rishi_Ventrapati 6 лет назад
Good information for beginners. Grate video
@vndprasadgrandhi7024
@vndprasadgrandhi7024 Год назад
Excellent..thanks
@krishnamr6608
@krishnamr6608 6 лет назад
Great Video. Simple and good. Keep doing.
@sathishrao7926
@sathishrao7926 5 лет назад
Quite a comprehensive information through good explanation..
@gundamaiahannamaina9273
@gundamaiahannamaina9273 5 лет назад
Nice tutorial. Instead of placing annotations in resource classes. We can create interface and place all api annotations on top of the methods in interface And implement that interface in the resource. Is this a good way of implementating swagger in separate interfaces ?
@jribkr8501
@jribkr8501 6 лет назад
I would appreciate if I can get answers to the following questions: Why do you use Springfox? What would I have to do if I want to use core swagger libraries? How does it work at a higher level? Somehow everyone is eager to use Springfox. Is there a specific path where swagger docs would be generated? Is there a way to customize the path where you want to generate the doc?
@kodosaru
@kodosaru 5 лет назад
Nice tutorial. Thank you!
@gokuldighe9160
@gokuldighe9160 3 года назад
Thank you ..very informative and detailed one indeed
@aneksingh4496
@aneksingh4496 5 лет назад
Nicely explained ....can u please make videos on Rx spring
@shivampatil5709
@shivampatil5709 5 лет назад
video is good as well as backgroung score.
@busbusvlog
@busbusvlog 4 года назад
Thank you for the video. It helped me a lot :)
@mosabkamal
@mosabkamal 4 года назад
nice and it's very clear video, Thanks a lot :-)
@Gabs__00
@Gabs__00 6 лет назад
Thank you so much from Brazil, your video help me a lot of
@TechPrimers
@TechPrimers 6 лет назад
+Gabriel Tavares my pleasure Gabriel
@balakrishnagajam
@balakrishnagajam 5 лет назад
Great job dude
@japantamil
@japantamil 4 года назад
super sirrr
@isidronavea7363
@isidronavea7363 5 лет назад
Nice tutorial!
@anilpatil5882
@anilpatil5882 6 лет назад
please upload videos which contains spring boot and jpa integration with curd/crud operation
@TechPrimers
@TechPrimers 6 лет назад
Hi Anil, take a look at the spring boot Playlist. I have done it with Spring Data JPA examples
@balrajmys
@balrajmys 7 лет назад
Awesome video :) great job :) very informative
@sathishkumar-qf6xb
@sathishkumar-qf6xb 6 лет назад
Thanks dude .very informative
@nikhilnr6392
@nikhilnr6392 6 лет назад
Great video !! very informative !! One quick question - I am working on adding Swagger documentation on REST Services developed by somebody else. This REST API does not have @RequestBody annotation for the Request object. When I add @RequestBody to the Request API, the API is breaking. Therefore, how can I include the REQUEST PARAMETERS in the Swagger documentation without adding @RequestBody ?
@victorlangat856
@victorlangat856 5 лет назад
a wonderful one here
@yusuffajarulloh4671
@yusuffajarulloh4671 3 года назад
thank you!!!
@TechPrimers
@TechPrimers 3 года назад
Glad it was helpful 👍🏻
@ramstube08
@ramstube08 5 лет назад
It's very detailed and very good. Thanks much for the video. Can you please tell me how to hit that request URL with a java program. If you can guide me to any other resource is also good..
@TechPrimers
@TechPrimers 5 лет назад
you can try googling for RestTemplate. using rest template you can hit the urls programmatically
@parasbishwakarma5737
@parasbishwakarma5737 6 лет назад
Great Video .. I have one question that is if the application is using security like spring security then how the swagger authorize users. Please Suggest.
@TechPrimers
@TechPrimers 6 лет назад
Swagger will internally use the secured API, so it still will use Spring Security and you wil have to set headers in the browser using REST clients
@StefanBanu
@StefanBanu 6 лет назад
Hi, what plugin was that automatic import in pom.xml when you just typed swaggerDependency? Or what was that?how can i type directly the name of the dependency in pom.xml? thank you,
@GauravSharma-wb9se
@GauravSharma-wb9se 4 года назад
how user will know request structure ?....can't it show sample request structure ?
@TechPrimers
@TechPrimers 4 года назад
Yes it does show. When you click on each endpoint it shows the structure
@nirvanjain3021
@nirvanjain3021 4 года назад
Liked Video Use something different every time other than Hello World It confuses first timers
@GlebKuzntesov
@GlebKuzntesov 5 лет назад
Great video!
@srinusrinivas6101
@srinusrinivas6101 5 лет назад
Thankyou helped me a lot
@Vihaanhyperboy200
@Vihaanhyperboy200 5 лет назад
Another awesome video from TechPrimers. Thank you. We have implemented our REST services with OAUTH2. How to test those services from Swagger UI. I could not find much resources on it.
@TechPrimers
@TechPrimers 5 лет назад
Swagger UI is just for getting documentation out of the exposed REST endpoints. you can use CURL to trigger REST calls for automated testing.
@gopalbarge4961
@gopalbarge4961 7 лет назад
Simply awesome
@TechPrimers
@TechPrimers 7 лет назад
+Gopal Barge thanks Gopal
@vishalthirumoorthy
@vishalthirumoorthy 4 года назад
This is a great video....I also have a question here.... Can I configure my code so that it will also general Yaml file for the swagger,.... I'll use that YAML in the swagger hub and can give it to the testing team while my application runs in the cloud...
@ManishKumar-lg9gt
@ManishKumar-lg9gt 2 года назад
Hi Vishal, I have the same requirement. Can you tell me, did you find any solution for this?
@sun-prairie
@sun-prairie 7 лет назад
Very useful. Thank you!
@TechPrimers
@TechPrimers 7 лет назад
+ennore82 glad that was useful
@RetheeshSoman
@RetheeshSoman 6 лет назад
Great. Thanks a lot
@chhagansahu8920
@chhagansahu8920 3 года назад
Great tutorial, thanks !! How can we pass custom header through the Swagger. Is it possible?
@sathishprithiviraj9756
@sathishprithiviraj9756 6 лет назад
Awesome video :)
@nikhilka9584
@nikhilka9584 5 лет назад
Nicely explained. How can we set api headers in swagger ?
@akhandpratapsingh1527
@akhandpratapsingh1527 5 лет назад
Thanks a lot, Man.
@melsaied101
@melsaied101 6 лет назад
Thank you for you effort
@mastercodeaz
@mastercodeaz 3 года назад
thanks youuu
@SurendraJayswal
@SurendraJayswal 5 лет назад
hi, I need to create a dropdown and based on selected value, show a different table of data. can you help?
@amityadav-bj9no
@amityadav-bj9no 4 года назад
Thank you!!
@virtexamit
@virtexamit 7 лет назад
Nice work !!
@harishpavant
@harishpavant Год назад
I am using Jersey with spring boot, I think I am getting error : bean creation failed. Do I have to do anything diffrent in this scenario. Thanks!
@sayitlikeitis1202
@sayitlikeitis1202 6 лет назад
Good videos from this company. Excepting that the BACKGROUND MUSIC is extremely ANNOYING !!! . Tell me is there any other website that explains concepts with movie like background ?
@poojas6172
@poojas6172 3 года назад
the video explaination is very good but the background sound is very annoying. Its not needed . Thanks
@TechPrimers
@TechPrimers 3 года назад
Removed them un latest videos pooja
@shareefhiasat9746
@shareefhiasat9746 4 года назад
Cool, just one note in io.swagger.annotations /** * Not used in 1.5.X, kept for legacy support. * * @return a longer description about this API, no longer used. */ @Deprecated String description() default "";
@ILyaCyclone
@ILyaCyclone 5 лет назад
You've added 200 "Successful Hello World" at 18:13, but why it isn't in the doc at 18:52?
@saktiranjanbehera7010
@saktiranjanbehera7010 5 лет назад
Thank you
@photo_lab4095
@photo_lab4095 5 лет назад
how we can add swagger ui authentication with out any credential please make one videos on this topic
@asmatsoomro7675
@asmatsoomro7675 5 лет назад
Hey the video was very helpful. I have one question though. How can we generate a yaml file from a swagger UI for your API?
@EnterpriseArchitect01
@EnterpriseArchitect01 4 года назад
I'am looking out to create Microservices documentation very similar to 'Rapid API ' i,e with get/post methods, Resource URI and testing approach with API key . Any idea, how to create such documentation ? Thanks in Advance
@Almost2333
@Almost2333 6 лет назад
Enter swaggerConfig and the autofill. Is Plugin? I installed Swagger Plugin from IDEA, but it is invalid. English is not my native language; please excuse typing errors.
@TechPrimers
@TechPrimers 6 лет назад
its called Live Template. I have added those texts before hand so that it can paste the code wherever i need
@Almost2333
@Almost2333 6 лет назад
Thanks :)
@abinashdas5222
@abinashdas5222 5 лет назад
How do we disable tryout and authorize options in the swagger ui?
@abhilashsulibela1414
@abhilashsulibela1414 6 лет назад
This is awesome! Thanks (y)
@KK-tz5fr
@KK-tz5fr 5 лет назад
thx bhai
@zishan-khan
@zishan-khan 4 года назад
hi, how can we send jwt token with the help of swagger for authentication?
@balakajendran1
@balakajendran1 5 лет назад
I was downloaded source from github and imported as maven project in STS tool. The Swagger UI page loading but Rest API details not shown. Can you please help me to resolve this issue.. Anything I have to do specifically for STS tool?
@praveenambati7804
@praveenambati7804 5 лет назад
facing same issue, have you fixed it already ?
@balakajendran1
@balakajendran1 5 лет назад
@@praveenambati7804 Download github code from this video and try it.
@praveenambati7804
@praveenambati7804 5 лет назад
@@balakajendran1 Thank You for your reply, I found another way to work on Swagger2. it's working now.
@laxbabuchintala6937
@laxbabuchintala6937 6 лет назад
Good video
@fsocietyearth9091
@fsocietyearth9091 5 лет назад
Just wondering, if you are coding and documenting both by yourself, then what tech writers are doing in your company?? I think this is part of tech writers
@AbhishekSagar-kf8fy
@AbhishekSagar-kf8fy 7 лет назад
Awesome can you please make on video on debugging microservices examale
@TechPrimers
@TechPrimers 7 лет назад
+Abhishek Sagar Sure
@subash961
@subash961 6 лет назад
I have question, Can i use swagger2 for spring MVC also? or only support spring boot?
@TheShantanu30
@TheShantanu30 4 года назад
How to send excel in response using swagger and springboot?
@TechPrimers
@TechPrimers 4 года назад
You have to send the right headers for attachment of your csv from spring boot
@TheShantanu30
@TheShantanu30 4 года назад
@@TechPrimers Thanks a lot for your reply. But the thing is what should be the typreof ResponseEntity, Will it be InputStream? If so, then how can I define InputStream in the swagger json?
@saktiranjanbehera7010
@saktiranjanbehera7010 5 лет назад
I am not able to import regex.Could you help me out.
@nishkarshjain5684
@nishkarshjain5684 2 года назад
Bro i did the same as u suggest but the swagger ui dashboard is not opening , its showing 403 status?? Anyone plz help??? 👆🏻
@phatzuy168
@phatzuy168 6 лет назад
nice thanks u very much
@amberkumar2359
@amberkumar2359 5 лет назад
Can you please suggest a way to access LDAP secured api with swagger2?
@bhubannayak6155
@bhubannayak6155 5 лет назад
Hi very informative video but can I have multiple registration of rest applications in one swagger UI ?
@TechPrimers
@TechPrimers 5 лет назад
at this point you cannot
@TechPrimers
@TechPrimers 5 лет назад
you have to leverage on API Gateways like APIGee
@nayanrajvansh6705
@nayanrajvansh6705 4 года назад
I tried using @ApiModelProperty for the complex objects in the response but it is working only for those objects which are coming as response in the form of a list but not in case of a standalone object. In the below example "List of ObejctA" is documented is Swagger but "Stand alone Object B" is not getting documented. e.g. @ApiModelProperty(notes="List of ObjectA") public List getObjectA() {. . . } @ApiModelProperty(notes="Stand alone Object B") public ObjectB getObjectB() {.......} What to do ?
@irshadb6587
@irshadb6587 6 лет назад
There is another option of writing the swagger yml file and generate the code from it. Could you elaborate on that too? Thanks
@TechPrimers
@TechPrimers 6 лет назад
sure will do
@anushaanu9619
@anushaanu9619 5 лет назад
I have followed all steps,but I'm getting whitelable error,in chrome,and 404 error in console,please answer this,I'm new to spring boot
@ILyaCyclone
@ILyaCyclone 5 лет назад
This is Spring Boot 1.5.6 video and it is 2.1.* nowadays - a lot could change, e.g. URL of the UI. Check official docs.
@mahendram6850
@mahendram6850 3 года назад
Hi TechPrimers, I followed the same steps but when I try to access localhost:8080/swagger-ui.html it says 404 error. Any idea?
@kunupat
@kunupat 5 лет назад
Good video. I have a question: if we have a set of REST microservices each running as a separate Spring boot app ( a maven project running inside docker) and if we have enabled swagger docs for each of the service, is there any way to consolidate swagger documentation of all services under one swagger UI URL?
@TechPrimers
@TechPrimers 5 лет назад
nope. none yet.
@praveenambati7804
@praveenambati7804 5 лет назад
localhost:8889/swagger-ui.html# doesn't showing any resource ..verified basepackage in SwaggerConfig seems fine according to my package names. can you please help how to fix this issue ? FYI, I followed same example
@neekhilverma9560
@neekhilverma9560 6 лет назад
Sir, Please show a example for the integration of swagger and mongoDB in spring framework
@TechPrimers
@TechPrimers 6 лет назад
i have separate video on mongo. you can merge them both
@neekhilverma9560
@neekhilverma9560 6 лет назад
@@TechPrimers ok sir I will try to merge them . Thank you 😊
@ccccljk
@ccccljk 5 лет назад
i can't run app in source code in eclipse, please help me
@chinmaykrovvidi8519
@chinmaykrovvidi8519 6 лет назад
So you cannot override 200 Message ?
@vbnandu867
@vbnandu867 6 лет назад
what about the response model?
@sudinranjitkar5726
@sudinranjitkar5726 7 лет назад
video on spring MVC too please
@TechPrimers
@TechPrimers 7 лет назад
here it is: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FlIJq9GlLWo.html
@sudinranjitkar5726
@sudinranjitkar5726 7 лет назад
No no not this one.. I mean REST API Documentation using Swagger2 in Spring MVC.
@TechPrimers
@TechPrimers 7 лет назад
it's the same process. instead of loading the swagger configs like we did for spring boot, you need to load it via xml. apart from that, others are same.
@sudinranjitkar5726
@sudinranjitkar5726 7 лет назад
Oh now i got it. I was having an error of blank page. The swagger-ui used to load but i get blank page. But finally found the error was in the pom.xml i changed the version of spring-core to 4.3.10.RELEASE and everything works fine. Version older then 4.3 gives an error like blank page..
@TechPrimers
@TechPrimers 7 лет назад
+Sudeen Ranjitkar cool. Thanks for sharing.
@vipinahuja6096
@vipinahuja6096 7 лет назад
Nice video :) .. I have one question -> Can I catch response from swagger and use in my java code. e.g: if I receive successful response Swagger should show some message and give me link do u want to go next request. Thanks in advance :) .
@TechPrimers
@TechPrimers 7 лет назад
HI Vipin, Swagger is used only as a documentation tool, we should not use it for controlling workflow using UI. You can get the response and use it in java code, but showing message and giving link for going to next request is an overkill.
@vipinahuja6096
@vipinahuja6096 7 лет назад
+Tech Primers thanks a lot for reply. Got it
@chrispie5
@chrispie5 6 лет назад
@@vipinahuja6096 I think what you looking for is a rest concept called hateoas. Whereby the rest service is giving you a response of the next available options
@sujithg5873
@sujithg5873 6 лет назад
Sooper
@nitheshp6566
@nitheshp6566 5 лет назад
getting error regex method in product api method
@ohhhgggeeezzz
@ohhhgggeeezzz 5 лет назад
Can you also doc about Spring REST Docs.... generate documentation through test, seems very interesting
Далее
Actuators in Spring Boot | Tech Primers
17:17
Просмотров 49 тыс.
🫢 #tiktok #elsarca
00:11
Просмотров 4,1 млн
Средневековый киборг
00:39
Просмотров 518 тыс.
What is a REST API?
9:12
Просмотров 1,5 млн
REST API Documentation using Swagger2 in Spring Boot
59:00
Spring Security using OAuth2 in Spring Boot | Tech Primers
1:00:37
How to add Swagger to Spring Boot - Brain Bytes
21:09
Просмотров 453 тыс.