Build beautiful and interactive API documentation for ORDS

Image
In this blog post, I will show you how to quickly build beautiful and interactive API documentation for your Oracle APEX REST data sources using  swagger hub . Using APEX v23.1. I downloaded the  titanic data set  and loaded them into tables in my APEX instance, created some authorized restful services and published them using swagger hub. You can create a free account on swagger hub.   Check out my titanic swagger hub here ; Press Authorize. Username REST, password Glasgow123! I won't go through creating RESTful services and just show you the four I created that sit on top of the titanic data set; The GET is a very simple SQL query;      select * from TITANIC_DATA_SET_NEW A handy tip is to add comments, as there will appear on swagger hub, making your API self documenting; Once you have created your modules, press the Generate Swagger Doc button; This will generate an open API for you.  Copy the API and paste it into swagger hub This will generat...

Oracle APEX style Region Display Selector (RDS) using CSS

This blog post describes how I used CSS to style Oracle APEX  Region Display Selectors (RDS) to get them looking a bit nicer.  It adds a border to the tabs and gives the tabs a background colour by using a small piece of CSS to inline CSS on page designer.  I am using version 19.2 but this solution should work on all versions.

To change the RDS tabs from this;

to this;

Add the following CSS to inline CSS (preferably a CSS file);

.apex-rds a {
    padding: 0 8px;
    font-size: 1.5rem;
}

ul.apex-rds li {

    box-shadow: 1px 2px 2px #AAAAAA;
    border: 1px solid #999999;
    border-radius: 8px 8px 8px 8px;
    background-color: #e6f9ff;
}

Tip.  Placing the CSS in a file allows you to use Google Chrome Developer tools to open the CSS file and change the CSS inline until you are happy with the look of the tabs.  Once you are happy with the look update the CSS file with your chosen styles.

Open developer tools and click on the arrow on the top left of developer tools;


Then click on one of the RDS tabs, this will open the CSS styles in developer tools where you can edit the style inline to get it looking how you want;


When you edit the style the tabs will update with the new CSS style setting.











Comments

Popular posts from this blog

Oracle APEX Interactive Grid colour cells based on a condition using JavaScript and CSS

How to send an email from your ORACLE APEX app

Oracle APEX style an Interactive Grid cell conditionally based on the value of another cell using JavaScript and CSS