Forum Discussion

technimadhu's avatar
technimadhu
New Contributor
5 years ago

Swagger - Parameter not rendering

I recently upgraded to Springboot 2.2 and after that my swagger 2.0 files were not showing parameters (Could not render this component message).

I made the swagger simple with just one endpoint and one param and i still see that error. When i copy paste it to swagger UI, no errors reported.. What could be the reason

 
 
 
 
 

My pom dependencies, screen shot of error, swagger yaml file and browser console error attached. Appreciate any tips on resolving this..

 

 

 

 

 

  • technimadhu's avatar
    technimadhu
    5 years ago

    Finally found the reason for my problem. I was including a library which had EnableWebMvc annotaiton, and our app is a SpringBoot app.. though i dont know exactly what the root cause is, but removing the annotation fixed my problem.

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    What version of Swagger UI do you use? Open the browser developer tools, switch to the Console tab and evaluate versions.

    • technimadhu's avatar
      technimadhu
      New Contributor

      my version is 3.17..   I did try to upgrade to 3.32 , and still got similar parameter not rendering error.  The swagger files worked fine with older Spring boot 1.5

      • technimadhu's avatar
        technimadhu
        New Contributor

        Finally found the reason for my problem. I was including a library which had EnableWebMvc annotaiton, and our app is a SpringBoot app.. though i dont know exactly what the root cause is, but removing the annotation fixed my problem.