Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

API browser for the GOV.UK Pay internal apps.

License

Notifications You must be signed in to change notification settings

alphagov/pay-api-docs-generator

Repository files navigation

GOV.UK Pay API documentation

As of June 2023 this repository is no longer actively maintained by the GOV.UK Pay team.

Preview and publish API browser for internal app APIs which include below.

API can be previewed using tech-docs-template (https://tdt-documentation.london.cloudapps.digital/) or swagger-editor (https://editor.swagger.io/)

Prerequisites

Requires

  • Ruby to preview docs using tech docs template
  • Docker to preview API using swagger-editor
  • cf CLI to deploy to PaaS

Preview

To preview API docs of an app, run the below command (which reads Open API specs from the app Github repo)

./build.sh [app] [browser]
  app - values supported: adminusers, connector, ledger, products, publicauth, webhooks
  browser - values supported: tech-docs-template, swagger 
  • Example 1: (to preview connector docs using tech-docs-template)

    ./build.sh connector tech-docs-template

    View docs at http://localhost:4567

  • Example 2: (to preview connector docs using swagger editor)

    ./build.sh connector swagger

    View docs at http://localhost:8080

To use a specific branch

  • Specify the branch name or commit sha to use using BRANCH variable as below:

    Example:

    BRANCH=726bcbb4257f1ffe55435ee29ed0a0196d92ceb8 ./build.sh connector swagger

To preview API docs from a local repo

  • Specify the LOCATION=local variable. Note that $WORKSPACE is to be set and should point to the repositories parent folder.

    Example:

    LOCATION=local ./build.sh adminusers tech-docs-template

Publish

To publish API browser for an app, run below:

./deploy.sh [app_name]

app_name: Allowed values - adminusers, connector, products, publicauth, ledger, webhooks

Docs are published to

PaaS location : api.cloud.service.gov.uk
org : govuk-pay
space : sandbox
Location: Publishes docs to URL govuk-pay-[app_name]-api-browser.cloudapps.digital

  • Example

    ./deploy.sh connector

Open docs at https://govuk-pay-connector-api-browser.cloudapps.digital

Note below for the deploy:

  • Only publishes using tech-docs-template
  • Generates tech-docs.yml and manifest.yml required before publishing

About

API browser for the GOV.UK Pay internal apps.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published