# digia-apic-publish

> Tool for publishing an API to the Kesko IBM GW using Digias deployment service.

Latest version **1.0.0** (published 2018-06-05) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install digia-apic-publish
pnpm add digia-apic-publish
yarn add digia-apic-publish
bun add digia-apic-publish
```

Provides the command `digia-apic-publish`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-06-05 |
| First published | 2018-06-05 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 26.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kesko Stockholm CoE |
| Maintainers | futurice-k |

## Links

- npm: https://www.npmjs.com/package/digia-apic-publish
- npm.io page: https://npm.io/package/digia-apic-publish

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^2.15.1
- [superagent](https://npm.io/package/superagent.md) ^3.8.2

## Recent versions

- 1.0.0 (latest) — 2018-06-05

## README

# 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>"
      }
    },
    [...]
  ]
}
```

---
_Source: https://npm.io/package/digia-apic-publish · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
