locked
Dashboard : Consolidated All Swagger YAML RRS feed

  • Question

  • User107810802 posted

    Hi All 

    I am having lot of swaggers at Git Repository , idea is to create a web application displaying the all the swagger under different categories and displaying swagger operation using Redoc.

    Any idea to achieve this or any library which can read the swagger from gitlab , categorize and display on Web Page. 

    Any other approach of doing this will also be helpful . This will help me to avoid visiting gitlab repository every time to look at various swagger operations.

    Regards

    Manoj 

    Friday, May 22, 2020 4:09 AM

All replies

  • User1535942433 posted

    Hi manoj629,

    Accroding to your descriptions,I'm guessing that you want to display all of the swagger using redoc.

    I suggest you could do:

    1. Installing ReDoc.

    2.Referencing redoc script in HTML.

    3.Adding <redoc> element to your page.

    More details,you could refer to below article:

    https://github.com/Redocly/redoc/blob/master/README.md

    Best regards,

    Yijing Sun

    Monday, May 25, 2020 7:36 AM
  • User107810802 posted

    Hi Yiz

    I understood your point on rading yaml and displaying on HTML.

    My requirement is I have 10 swaggers , i want to create dashboard displaying all the swagger with different categories.

    Regards

    Manoj 

    Monday, May 25, 2020 8:24 AM
  • User1535942433 posted

    Hi manoj629,

    Accroding to your description,could you tell us why you have 10 swaggers?Do you have 10 projects?

    As far as I think,you could use @rebilly/swagger-combine to shallow-merge two or more swagger 2.0 specs into one.

    More details,you could refer to below article:

    https://github.com/Rebilly/swagger-combine

    Best regards,

    Yijing Sun

    Tuesday, May 26, 2020 8:05 AM
  • User107810802 posted

    Hi Yij

    Yes , we have 10 projects , so my dashboard should look like Project Name and Inside Project Name multiple swagger name and then display the swagger as HTML.

    Regards

    Manoj 

    Tuesday, May 26, 2020 8:09 AM
  • User1535942433 posted

    Hi manoj629,

    Accroding to your description,as far as I think,you could create swaggers for each projects,and then you need to get each swagger yaml file path to Consolidate into one page.

    Just like this:

     var apis = [
            {
              name: 'PetStore',
              url: 'https://rebilly.github.io/ReDoc/swagger.yaml'
            },
            {
              name: 'Instagram',
              url: 'https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml'
            },
            {
              name: 'Google Calendar',
              url: 'https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/swagger.yaml'
            }
          ];
    

    More details,you could refer to below article:

    https://github.com/Redocly/redoc/blob/gh-pages/examples/multiple-apis/index.html

    Best regards,

    Yijing Sun

    Wednesday, May 27, 2020 6:53 AM