cancel
Showing results for 
Search instead for 
Did you mean: 

Add custom css to markdown table

SOLVED
Highlighted
Visitor

Add custom css to markdown table

Hi, 

 

I am trying to beautify the description part for api. So i added the markdown tables. But then i am not able to see actual tables properties when it's rendered in the UI. Is there a way i can add css and make it working?

 

Added table as shown below:

----------------------------------------------------------------------------------------------------------------------------------------------

| Sort Mode | Value | Example |
|------------------------- |------------ |------------------------------------------------------------------ |
| Ascending | **asc** | `?order_by=database_name::asc` |
| Descending | **desc** | `?order_by=tp_account_id::desc` |
| Sort on multiple fields | **&#124;** | <code>?order_by=database_name::asc&#124;total_count::desc</code> |

 

----------------------------------------------------------------------------------------------------------------------------------------------

Attached screenshot of the UI.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Staff

Re: Add custom css to markdown table

In order to apply custom css, I believe you would need to build your own version of SwaggerUI, then implement new css rules. You could also build a plugin to replace the component that you would like to change. The plugin would supercede the SwaggerUI version. I would recommend using SwaggerUI's plugin system rather than make changes to SwaggerUI itself, as it would be easier to stay updated with new releases. For more information, here is some documentation on customization: https://swagger.io/docs/open-source-tools/swagger-ui/customization/overview/

View solution in original post

1 REPLY 1
Highlighted
Staff

Re: Add custom css to markdown table

In order to apply custom css, I believe you would need to build your own version of SwaggerUI, then implement new css rules. You could also build a plugin to replace the component that you would like to change. The plugin would supercede the SwaggerUI version. I would recommend using SwaggerUI's plugin system rather than make changes to SwaggerUI itself, as it would be easier to stay updated with new releases. For more information, here is some documentation on customization: https://swagger.io/docs/open-source-tools/swagger-ui/customization/overview/

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors