Skip to content

v2.1.2

Compare
Choose a tag to compare
@elrayle elrayle released this 04 Oct 11:59

Actions Required to upgrade

You do not need to take any actions to start using this release of questioning authority.

Optional New Functionality

QA Linked Data API Documentation

QA can now install API documentation for the linked data module in QA. It uses Swagger-UI for the interactive documentation page that is driven by apidoc.json, a configuration file defining the API using the OpenAPI Specification.

Installation

To install, run the following in your app...

rails g qa:apidoc

This will run the apidoc generator which copies the API documentation into public/qa/apidoc directory in your app.

To view the API documentation, run your app and navigate to...

https://YOUR_HOST_LOCATION/qa/apidoc/

NOTE: The ending / is required for the page to display.

Customizations

You can modify the styles public/qa/swagger-ui.css. Note that this is a compressed CSS file.

You may want to add services to public/qa/apidoc.json for your actual services.

The current definition lets you change the site_host and apiBase to match your installation:

  "servers": [
    {
      "url": "http://{site_host}/{apiBase}",
      "description": "QA v2.1 API Server",
      "variables": {
        "site_host": {
          "default": "localhost:3000",
          "description": ""
        },
        "apiBase": {
          "default": "qa"
        }
      }
    }
  ],

In this, you may want to change the default values. apiBase is the location of the QA engine mount in routes. You may also want to add your known server locations which will show up in the drop menu.

  "servers": [
    {
      "url": "http://{site_host}/{apiBase}",
      "description": "QA v2.1 API Server",
      "variables": {
        "site_host": {
          "default": "my.production.server",
          "description": ""
        },
        "apiBase": {
          "default": "authorities"
        }
      }
    }
    {
      "url": "http://my.staging.server/authorities",
      "description": "QA v2.1 API Server",
      }
    }
  ],

Change Log

  • add qa:apidoc generator to optionally add QA Linked Data API documentation to app using swagger