1.0.0 • Published 6 years ago

digia-apic-publish v1.0.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
6 years ago

Helper tool to publish API ot IBM GW using digias publishing service

Can be used to fix issues caused by hapi-swagger-plugin on the fly. Incorparates the fixes on the fly during publish-command.

Usage

Options:
  -V, --version         output the version number
  -h, --help            output usage information

Commands:

  fixswagger [options]
  publish [options]

fixswagger command

Usage: yarn start fixswagger [options]

Options:

  -c, --config <path>  API configuration file (default: config.json)
  -e, --env <env>      Environment to publish to
  -h, --help           output usage information

publish command

Usage: yarn start publish [options]

Options:

  -V, --version            output the version number
  -c, --config <path>      API configuration file (default: config.json)
  -e, --env <env>          Environment to publish to (qa or prod)
  --no-hapi-swagger-fixes  Do not fix issues in swagger.json caused by hapi-swagger-plugin
  -h, --help               output usage information

Sample configuration file

{
  "clientId": "<DIGIA_SERVICE_CLIENT_ID>",
  "clientSecret": "<DIGIA_SERVICE_CLIENT_SECRET>",
  "apis" : [
    {
      "name": "k-rauta-sample-api", // Same technical name as in GW
      "qa": {
        "url": "https://k-rauta-api-sample-qa.herokuapp.com/swagger.json",
        "stageId": "<QA_STAGE_ID_FROM_FIRST_PUBLISH>"
      },
      "prod": {
        "url": "https://k-rauta-api-sample-prod.herokuapp.com/swagger.json",
        "stageId": "<PROD_STAGE_ID_FROM_FIRST_PUBLISH>"
      }
    },
    [...]
  ]
}