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.
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
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
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,
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
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.
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 ?
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.
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 ?
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 ?
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?
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?
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...
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..
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
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
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.
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.
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 ?
We need to develop multiple micro services and so wanted to know if we can have separate swagger ui where documentation of all these micro services can be obtained in single shot. Please respond asap
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?
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 :) .
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 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
@Tech Primers Please Explain how to Solve This Problem...I Tried So Many Solutions From Google,Stackoverflow etc But Still Error Not Fixed... Can You Please Respond Bro Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.toString()" because the return value of "springfox.documentation.spi.service.contexts.Orderings.patternsCondition(springfox.documentation.RequestHandler)" is null at springfox.documentation.spi.service.contexts.Orderings$8.compare(Orderings.java:112) ~[springfox-spi-2.6.1.jar:null]
@@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?
+Tech Primers, I have searched in my workspace under webapp folder, there is no any file generated. should we write any annotation to generate the file?
great tutorial! after days and days of looking for a good explanation you did it in less than half an hour. thank you!
Cheers mate
Your video is like any beginner can easily understand....Thanks for your effort
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.
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
Explained in a very simple way. Tried once and executed. That's all....
Thank you...
I use all technologies you talk about in your videos:) Great tutorial. Thank you.
+The Hedgo thanks dudr
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
Awesome explaination! Looking forward to more content
Explained in very clean and precise way. Thanks
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,
Wow,you again proveed buddy,i learned new things from u...I gave u thumpsup..Keep rocking...
+VIGNESH R thank you Vignesh.
Happy Learning
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
Very clean and precise tutorial!
Great tutorial, thanks !! How can we pass custom header through the Swagger. Is it possible?
Thanks, mate. It was a pleasure to watch it. Excellent job very informative ;)
Great Tech Primers good job please make more video on Rest Webservices with Spring Rest WebServices
sure ramjeet. any specific usecase you want me to cover?
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.
EntityEndPoint is the Endpoint exposing your entity(eg Users).
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 ?
simple and nice explanation step by step
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.
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
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!
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 ?
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 ?
Quite a comprehensive information through good explanation..
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?
facing same issue, have you fixed it already ?
@@praveenambati7804 Download github code from this video and try it.
@@balakajendran1 Thank You for your reply, I found another way to work on Swagger2. it's working now.
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?
nope. none yet.
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...
Hi Vishal, I have the same requirement. Can you tell me, did you find any solution for this?
Good Video and very easy to understand. Thanks for this tutorial. Thanks Bro.
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?
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..
you can try googling for RestTemplate. using rest template you can hit the urls programmatically
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
Hi TechPrimers, I followed the same steps but when I try to access localhost:8080/swagger-ui.html it says 404 error. Any idea?
Can you please suggest a way to access LDAP secured api with swagger2?
hi, I need to create a dropdown and based on selected value, show a different table of data. can you help?
Great Video. Simple and good. Keep doing.
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
The video is neat and untidy
amazing knowledgeable video... thank you so much
You've added 200 "Successful Hello World" at 18:13, but why it isn't in the doc at 18:52?
hi,
how can we send jwt token with the help of swagger for authentication?
nice and it's very clear video, Thanks a lot :-)
Thank you ..very informative and detailed one indeed
please upload videos which contains spring boot and jpa integration with curd/crud operation
Hi Anil, take a look at the spring boot Playlist. I have done it with Spring Data JPA examples
Thank you so much from Brazil, your video help me a lot of
+Gabriel Tavares my pleasure Gabriel
simple and easy....thanks sir ji..
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.
Swagger UI is just for getting documentation out of the exposed REST endpoints. you can use CURL to trigger REST calls for automated testing.
Thank you for the video. It helped me a lot :)
Nicely explained.
How can we set api headers in swagger ?
Good information for beginners. Grate video
Hi very informative video but can I have multiple registration of rest applications in one swagger UI ?
at this point you cannot
you have to leverage on API Gateways like APIGee
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.
its called Live Template. I have added those texts before hand so that it can paste the code wherever i need
Thanks :)
Nice tutorial. Thank you!
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 ?
How do we disable tryout and authorize options in the swagger ui?
Nicely explained ....can u please make videos on Rx spring
video is good as well as backgroung score.
Excellent..thanks
Bro i did the same as u suggest but the swagger ui dashboard is not opening , its showing 403 status??
Anyone plz help???
👆🏻
Great job dude
Awesome video :) great job :) very informative
how we can add swagger ui authentication with out any credential please make one videos on this topic
There is another option of writing the swagger yml file and generate the code from it. Could you elaborate on that too? Thanks
sure will do
Nice tutorial!
We need to develop multiple micro services and so wanted to know if we can have separate swagger ui where documentation of all these micro services can be obtained in single shot. Please respond asap
you cannot do that for all microservices in one place. It can be done only at individual service level
Tech Primers ok
Can I read the swagger json from all my services and call it from a single place??
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?
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 :) .
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.
+Tech Primers thanks a lot for reply. Got it
@@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
a wonderful one here
Can I get this documentation offline, i.e, when my service is not running then also one could read the Docs ??
you will have to host it somewhere or the other. At max, you can download the html page.
Thanks dude .very informative
I am not able to import regex.Could you help me out.
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
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.
Very useful. Thank you!
+ennore82 glad that was useful
super sirrr
Great video!
how user will know request structure ?....can't it show sample request structure ?
Yes it does show. When you click on each endpoint it shows the structure
@Tech Primers
Please Explain how to Solve This Problem...I Tried So Many Solutions From Google,Stackoverflow etc But Still Error Not Fixed...
Can You Please Respond Bro
Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.toString()" because the return value of "springfox.documentation.spi.service.contexts.Orderings.patternsCondition(springfox.documentation.RequestHandler)" is null
at springfox.documentation.spi.service.contexts.Orderings$8.compare(Orderings.java:112) ~[springfox-spi-2.6.1.jar:null]
Simply awesome
+Gopal Barge thanks Gopal
Thanks a lot, Man.
Nice work !!
@Tech primers,
How are you getting the license for free the Intellij, I can see on their site, it is very costly.
Use Community edition. It's free
Great. Thanks a lot
Thankyou helped me a lot
Liked Video
Use something different every time other than Hello World
It confuses first timers
How to send excel in response using swagger and springboot?
You have to send the right headers for attachment of your csv from spring boot
@@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?
what about the response model?
thank you!!!
Glad it was helpful 👍🏻
i can't run app in source code in eclipse, please help me
Thank you!!
This is awesome! Thanks (y)
Sir,
Please show a example for the integration of swagger and mongoDB in spring framework
i have separate video on mongo. you can merge them both
@@TechPrimers ok sir
I will try to merge them . Thank you 😊
So you cannot override 200 Message ?
Awesome
can you please make on video on debugging microservices examale
+Abhishek Sagar Sure
I have question, Can i use swagger2 for spring MVC also? or only support spring boot?
Where is the swagger-ui.html file will store?
Can we customize swagger-ui.html ?
+Vipin Samleti hi Vipin, it's generated under the sources. You can use the relevant annotations to modify it
+Tech Primers, I have searched in my workspace under webapp folder, there is no any file generated. should we write any annotation to generate the file?
+Vipin Samleti it should be in your target folder
Awesome video :)
Thank you for you effort
what is the name of that sound you are playing in intro
Its from Joakim Karud
thanks youuu
Good video
Thank you very much for this video..could you pls add video on how to add headers in swagger as well.Thanks
sure Vikash. Will do
@@TechPrimers That would be great!
Thank you
How we can deploy war file into tomcat. Make a video for it.
HI DS, there are lots of good videos in RUclips already for that
Tech Primers thanks for reply I have faced a issue that is resolved :)