# @griffins/small-swagger-codegen

> A small version of swagger-codegen. Does fewer things with less code.

Latest version **2.0.0** (published 2019-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @griffins/small-swagger-codegen
pnpm add @griffins/small-swagger-codegen
yarn add @griffins/small-swagger-codegen
bun add @griffins/small-swagger-codegen
```

Provides the command `small-swagger-codegen`.

## 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 | 2.0.0 |
| Published | 2019-09-26 |
| First published | 2019-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.9 |
| Dependencies | 7 |
| Unpacked size | 235.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | GasBuddy |
| Maintainers | griffins |

## Links

- npm: https://www.npmjs.com/package/@griffins/small-swagger-codegen
- Repository: https://github.com/gas-buddy/small-swagger-codegen
- Homepage: https://github.com/gas-buddy/small-swagger-codegen#readme
- Issues: https://github.com/gas-buddy/small-swagger-codegen/issues
- npm.io page: https://npm.io/package/@griffins/small-swagger-codegen

## Dependencies (7)

- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.13.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [url-join](https://npm.io/package/url-join.md) ^4.0.0
- [handlebars](https://npm.io/package/handlebars.md) ^4.1.2
- [rest-api-support](https://npm.io/package/rest-api-support.md) ^1.0.1

## Recent versions

- 2.0.0 (latest) — 2019-09-26

## README

# small-swagger-codegen

[![wercker status](https://app.wercker.com/status/3da8a3d8992ce63c2db82c29f02a584b/s/master "wercker status")](https://app.wercker.com/project/byKey/3da8a3d8992ce63c2db82c29f02a584b)

A small version of swagger-codegen. Does fewer things with less code. Supports Swift, Kotlin, and Javascript (using fetch/EventSource).

Usage
=====
You can either pass parameters on the command line or a configuration file.

Command line example:
This will build a Javascript module named my-spec-js-client with a default export of MyApi using snake casing (as opposed to the default camel casing) for methods and parameters, and output to the default directory - `client` (which can be overridden with `--output=someotherdir`)
```
npx small-swagger-codegen --language=js --spec=./my-spec.json --name=MyApi --packageName=my-spec-js-client --snake
```

Configuration files can be useful when you want to generate a number of clients at the same time, such as in a native app.

```
{
  "language": "swift",
  "output": "./DevelopmentPods/Generated/",
  "specs": {
    "ApiOne": {
      "spec": "./node_modules/api-one-spec/api-one-spec.json",
      "className": "ApiOneAPI",
      "basePath": "api1"
    },
    "OtherApi": {
      "spec": "./node_modules/other-api-spec/other-api-spec.json",
      "className": "OtherAPI",
      "basePath": "other"
    }
  }
}
```

Which, if saved in a file called `config.json` is run with
```
npx small-swagger-codegen ./config.json
```

---
_Source: https://npm.io/package/@griffins/small-swagger-codegen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
