Java Spring Boot REST API Documentation | What, Why and How of Swagger

Sdílet
Vložit
  • čas přidán 21. 06. 2024
  • This is Full Course on Swagger Documentation For Java Spring Boot REST API Application. API Documentation is essential part of any REST API application. Swagger addresses the burning problem of api developers and cuts down the pain of manual documentation and auto generates the required api documentation. Swagger generates document for Java Spring Boot REST ASPI application automatically.
    In this tutorial, Need of API documentation, how to automate it using Swagger, then swagger configuration followed by detailed demonstration using CloudVendorAPI is discussed. Finally, REST API is tested using Postman tool and Swagger UI. This session covers what is swagger, why to use swagger and how to use swagger in detail.
    How to include swagger spring dependency from maven repository and swagger website is also demonstrated.
    Kindly attend full session to understand it completely.
    Some Notes -
    For Swagger -
    API Design
    API Development
    API Testing
    API Mocking
    API Governance
    API Monitoring
    API Documentation
    Some Annotations -
    @SpringBootApplication @ApiOperation @ApiModel @ApiModelProperty @Bean etc.
    API Documentation -
    Swagger takes the manual work out of API documentation
    It helps with generating, visualizing, and maintaining API docs.
    Standardized API docs
    Fosters Collaboration
    swagger.io/
    #thinkconstructive #eshapuri #swaggerspringboot
    Spring Boot Session Links are given below -
    1st Spring Boot session - • Java REST API with Spr...
    2nd Spring Boot session - • Creating Java REST API...
    3rd Spring Boot Session - • Exception Handling in ...
    4th Spring Boot Session - • Java Spring Boot REST ...
    5th Spring Boot Session - • Master Unit Testing Ja...
    Playlist for Spring Boot How To tutorial is -
    • Spring Boot REST API C...
    GitHub link for CloudVendorApi code -
    github.com/thinkconstructive/...
    Pls subscribe to the channel -
    / @thinkconstructive
    Follow me on -
    Official Website: thinkconstructive.com/
    @Twitter : / tconstructive
    @LinkedIn : / eshapuri
    @LinkedIn : / think-constructive
    Support the channel with your Amazon purchase -
    Atomic Habits - amzn.to/3yEzGU5
    The Courage To Be Disliked - amzn.to/3wheVMz
    Disclosure, I use affiliate Amazon links above. Purchasing through these links gives me a small commission -- the price to you is the same.
    Chapters
    00:00 Welcome
    00:54 What is API Documentation and Swagger
    02:54 Why to use Swagger and Why to document API
    06:45 Swagger WebSite Walkthrough
    08:02 Swagger Demonstration - CloudVendorAPI Application Recap
    10:30 Swagger Demonstration - Springfox Maven Dependency in pom.xml
    13:52 Swagger Demonstration - Testing API Documentation using Postman
    17:28 Swagger Demonstration - Testing API Documentation using Swagger UI
    19:14 Swagger Demonstration - Customize API Documentation - Swagger Docket Bean
    27:20 Swagger Demonstration - Testing Customized API Documentation using Swagger UI
    29:55 Swagger Demonstration - Addition of Optional Annotations to API Documentation
    34:19 Swagger Demonstration - Testing Optional Behaviour of API Documentation using Swagger UI
    35:57 Summary
    36:58 Thank You
    Queries
    how to do api documentation
    how to use swagger
    how to configure swagger
    what is swagger
    what is swagger api documentation
    how to implement api documentation
    how to automate api documentation
    what is postman
    how to use postman
    what is swagger url
    what is swagger ui
    how to test swagger ui
    how to test swagger api
    how to test swagger
    what is api documentation
    what is swagger maven dependency
    what is pom.xml
    how to add springfox dependency
    how to add swagger dependency

Komentáře • 46

  • @ThinkConstructive
    @ThinkConstructive  Před rokem +5

    API Documentation is essential part of any REST API application. This is Full Course on Swagger Documentation For Java Spring Boot REST API Application.
    In this tutorial, Need of API documentation, how to automate it using Swagger, then swagger configuration for followed by detailed demonstration using CloudVendorAPI is discussed. Finally, REST API is tested using Postman tool and Swagger UI.
    Kindly attend full session to understand it completely.
    Happy learning.
    Cheers,
    Esha

  • @blackjackal9506
    @blackjackal9506 Před rokem +7

    Excellent spring boot tutorial ma’am
    Thank you!

  • @NgorSeck
    @NgorSeck Před rokem +1

    Great, it's very helpfull.
    thanks

  • @MallikarjunaReddyY
    @MallikarjunaReddyY Před měsícem

    Good content with nice explanation, thank you mam

  • @naveenrajukopparthi3046
    @naveenrajukopparthi3046 Před rokem +2

    Really Thank you Maa

  • @SinghRahul-
    @SinghRahul- Před rokem +2

    Thanku ma'am

  • @swatimishra660
    @swatimishra660 Před 3 dny

    not able to check api doc from postman as well as in ui both is not working for me

  • @user-uy3lk3mp2d
    @user-uy3lk3mp2d Před 4 měsíci

    thx for this great vedio!! um...i followed it well.. but in building docket bean, paths is "/cloudvendor/*" right?
    but, when i run it, in document, there are only GET(by id) and DELETE method in controller..
    so i updated the paths to "/cloudvendor". and then run it. but in document, there are only GET(all), POST, PUT method in controller..
    so i asked this to chat gpt, gpt taught me to update paths to "/cloudvendor/**" . so i did it, and all methods appear.
    but it is not good that..right? how can i do?? can you explain how to do it??

  • @83sendhil
    @83sendhil Před 6 měsíci +2

    Mam, Thanks for the course. From my end, i have updated pom.xml and application.yml file but getting v3/api-docs as not found error in postman. Plz share your thoughts. Is there any additional configuration we need to do?

  • @nareshchaudhary3624
    @nareshchaudhary3624 Před 7 měsíci

    Can we do it without api_path_matcher?

  • @shubhampatil7336
    @shubhampatil7336 Před rokem +1

    Mam please make a series on microservice using spring boot ,spring cloud?

  • @unknowninformation827
    @unknowninformation827 Před rokem +1

    Mam,pls make a video of how real time application deployment happen in IT.
    And what are the software used for it and how?

  • @imranullah7355
    @imranullah7355 Před rokem +1

    Ma'am, where and how you created the request method? please let me know that how to make a Swagger request method?

    • @ThinkConstructive
      @ThinkConstructive  Před rokem +2

      I think you are looking for czcams.com/video/iBGkJln9BPo/video.html This is the first video of this series and in this all four request methods are created. Playlist link for the series is - czcams.com/play/PLcs1FElCmEu121gqGwlQt47d0SqNkzSTK.html
      Hope this helps

  • @shrutisankhe3703
    @shrutisankhe3703 Před rokem +1

    Hi Ma'am
    Ma'am swagger dependency not added in pom.xml they gives error "Dependency io.springfox not found

  • @SinghRahul-
    @SinghRahul- Před rokem +2

    Waiting for microservices

  • @user-dt8hh3or2t
    @user-dt8hh3or2t Před rokem +1

    How to customize the implementation of swagger authentication?

    • @ThinkConstructive
      @ThinkConstructive  Před rokem +1

      More methods needs to be called in Docket bean - .securitySchemes(singletonList(apiKey()))
      .securityContexts(singletonList(securityContext())) -
      For more info please refer - springfox.github.io/springfox/docs/current/#docket-spring-java-configuration

  • @okechukwubrightonwumere6451

    Dear Ma, I am getting "This application has no explicit mapping for /error, so you are seeing this as a fallback." There was an unexpected error (type=Not Found, status=404).
    No message available. What could be the cause

    • @ThinkConstructive
      @ThinkConstructive  Před rokem +1

      Hello,
      Please check the application logs for more details, as this the default error page of Spring Boot for any kind of error. Get the detailed error information from application console logs.

    • @okechukwubrightonwumere6451
      @okechukwubrightonwumere6451 Před rokem

      @@ThinkConstructive org.apache.tomcat.jni.LibraryNotFoundError: Can't load library: C:\Users\okeyb\Documents\Spring Boot\book-rest-demo\bin\tcnative-2.dll, Can't load library: C:\Users\okeyb\Documents\Spring Boot\book-rest-demo\bin\libtcnative-2.dll, Can't load library: C:\Users\okeyb\Documents\Spring Boot\book-rest-demo\bin\tcnative-1.dll, Can't load library: C:\Users\okeyb\Documents\Spring Boot\book-rest-demo\bin\libtcnative-1.dll, no tcnative-2 in java.library.path: C:\Program Files\Java\jdk-17.0.4\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-17.0.4\bin;C:\maven\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin;c:\mingw64\bin;C:\Program Files
      odejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\;C:\Users\okeyb\AppData\Local\Microsoft\WindowsApps;;C:\Users\okeyb\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\heroku\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin;;C:\Users\okeyb\AppData\Roaming
      pm;., no libtcnative-2 in java.library.path: C:\Program Files\Java\jdk-17.0.4\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-17.0.4\bin;C:\maven\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin;c:\mingw64\bin;C:\Program Files
      odejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\;C:\Users\okeyb\AppData\Local\Microsoft\WindowsApps;;C:\Users\okeyb\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\heroku\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin;;C:\Users\okeyb\AppData\Roaming
      pm;., no tcnative-1 in java.library.path: C:\Program Files\Java\jdk-17.0.4\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-17.0.4\bin;C:\maven\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin;c:\mingw64\bin;C:\Program Files
      odejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\;C:\Users\okeyb\AppData\Local\Microsoft\WindowsApps;;C:\Users\okeyb\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\heroku\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin;;C:\Users\okeyb\AppData\Roaming
      pm;., no libtcnative-1 in java.library.path: C:\Program Files\Java\jdk-17.0.4\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-17.0.4\bin;C:\maven\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin;c:\mingw64\bin;C:\Program Files
      odejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\okeyb\AppData\Local\Programs\Python\Python310\;C:\Users\okeyb\AppData\Local\Microsoft\WindowsApps;;C:\Users\okeyb\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\heroku\bin;C:\Program Files\JetBrains\IntelliJ IDEA 2022.2.3\bin;;C:\Users\okeyb\AppData\Roaming
      pm;.
      at org.apache.tomcat.jni.Library.(Library.java:93) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
      at org.apache.tomcat.jni.Library.initialize(Library.java:148) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
      at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:200) ~[tomcat-embed-core-10.1.1.jar:10.1.1]
      at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:112) ~[tomcat-embed-core-10.1.1.jar:10.1.1]

    • @okechukwubrightonwumere6451
      @okechukwubrightonwumere6451 Před rokem

      java.lang.ClassNotFoundException: java.lang.WrongThreadException
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]

    • @_Nguyenan
      @_Nguyenan Před rokem

      @@okechukwubrightonwumere6451 i have the same error with you, can you fix it ?

  • @gurunadh3661
    @gurunadh3661 Před 3 měsíci

    for spring 3 versions springfox is not in usage, instead use springdoc openapi

  • @gokulaher2476
    @gokulaher2476 Před 3 měsíci +1

    Good video with proper content
    I have one request
    If possible can you pl.reduce the frequency of the Like subscribe amd bell 🔔 notification pop-up its feeling like disturbing while watching the video
    Thanks!

    • @ThinkConstructive
      @ThinkConstructive  Před 2 měsíci +2

      Thank you 😊
      Sure, will take care of this in upcoming videos.
      Please stay connected and share with others too.

  • @krish1947
    @krish1947 Před 9 měsíci +1

    hi mam !! v3/api-docs this isn't working for me can u help

  • @manishreddy6039
    @manishreddy6039 Před 3 měsíci

    I got struck with getting custom description on swagger UI. @ThinkConstructive can you please help me with it... I tried a lot to get custom info on swagger UI.. I have tried n number changes and configurations , still I am facing the same issue.. can you please help me it would be great help for me to move forward

  • @vanshgoyal-uo5cf
    @vanshgoyal-uo5cf Před 10 dny

    mam it's not working

  • @nagareddy9744
    @nagareddy9744 Před rokem +1

    where is git repo madam

    • @ThinkConstructive
      @ThinkConstructive  Před rokem +1

      github.com/thinkconstructive/rest-api-spring-boot-demo/tree/master

  • @uvanana.
    @uvanana. Před 27 dny

    Mam again again am getting white label 404 error why mam , everything is working fine after doing testing its not coming like get post or any method also i don't got any errors in testing i fixed everything and it was working fine, can yu let me know why "timestamp": "2024-05-26T10:34:44.635+00:00",
    "status": 404,
    "error": "Not Found",
    "trace": "org.springframework am getting this error when everything is fine
    Tried to change the port number, restarting and endpoints checking but nothing works , plz suggest a solution