# @types/swagger-restify-mw

> TypeScript definitions for swagger-restify-mw

Latest version **0.7.9** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/swagger-restify-mw
pnpm add @types/swagger-restify-mw
yarn add @types/swagger-restify-mw
bun add @types/swagger-restify-mw
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.7.9 |
| Published | 2023-11-07 |
| First published | 2017-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51433 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/swagger-restify-mw
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swagger-restify-mw
- npm.io page: https://npm.io/package/@types/swagger-restify-mw

## Dependencies (1)

- [@types/swagger-node-runner](https://npm.io/package/@types/swagger-node-runner.md) *

## Recent versions

- 0.7.9 (latest) — 2023-11-07
- 0.7.7 (ts2.4) — 2018-10-22
- 0.7.2 (ts2.2) — 2017-08-21
- 0.7.0 (ts2.0) — 2017-01-02
- 0.7.8 — 2023-10-18
- 0.7.6 — 2018-02-26
- 0.7.5 — 2018-02-10
- 0.7.4 — 2018-01-03
- 0.7.3 — 2017-11-09
- 0.7.1 — 2017-06-27

## README

# Installation
> `npm install --save @types/swagger-restify-mw`

# Summary
This package contains type definitions for swagger-restify-mw (https://github.com/apigee-127/swagger-restify#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swagger-restify-mw.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/swagger-restify-mw/index.d.ts)
````ts
/* =================== USAGE ===================
import * as SwaggerRestify from "swagger-restify-mw";
import * as restify from "restify";

let app = restify.createServer();

let config = {
  appRoot: __dirname // required config
} as SwaggerRestify.Config;

SwaggerRestify.create(config, function(err, swaggerRestify) {
  if (err) { throw err; }

  swaggerRestify.register(app);

  let port = process.env.PORT || 10010;
  app.listen(port);

  if (swaggerRestify.runner.swagger.paths['/hello']) {
    console.log('try this:\ncurl http://127.0.0.1:' + port + '/hello?name=Scott');
  }
});

 =============================================== */

import { Config, RestifyMiddleware } from "swagger-node-runner";

/** export interfaces */
export { Config, RestifyMiddleware } from "swagger-node-runner";

/**
 * Create a new instance of a Restify specific `SwaggerNodeRunner` middleware
 *
 * The `swagger-node-runner` module has the following config priority:
 *   1. `swagger_*` environment vars
 *   2. `config` passed to `create()`
 *   3. read from swagger node in `default.yaml` in config directory
 *   4. module defaults
 *
 * @see @link{https://github.com/apigee-127/swagger-express|Github}
 */
export function create(config: Config, cb: (err: Error | undefined, middleware: RestifyMiddleware) => void): void;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/swagger-node-runner](https://npmjs.com/package/@types/swagger-node-runner)

# Credits
These definitions were written by [Michael Mrowetz](https://github.com/micmro).

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