Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fastify-openapi-glue

seriousme113.9kMIT4.9.1TypeScript support: included

generate a fastify configuration from an openapi specification

fastify, swagger, openapi, generator

readme

Fastify OpenApi Glue

CI status Coverage Status NPM version npm

A plugin for fastify to autogenerate a configuration based on a OpenApi(v2/v3) specification.

It aims at facilitating "design first" API development i.e. you write or obtain an API specification and use that to generate code. Given an OpenApi specification Fastify-openapi-glue handles the fastify configuration of routes and validation schemas etc. You can also generate your own project from a OpenApi specification.

Upgrading

If you are upgrading from a previous major version of fastify-openapi-glue then please check out UPGRADING.md.

Install

npm i fastify-openapi-glue --save

Plugin

Usage

Add the plugin to your project with register and pass it some basic options and you are done !

import openapiGlue from "fastify-openapi-glue";
import { Service } from "./service.js";
import { Security } from "./security.js";

const options = {
  specification: `${currentDir}/petstore-openapi.v3.json`,
  serviceHandlers: new Service(),
  securityHandlers: new Security(),
  prefix: "v1",
};


fastify.register(openapiGlue, options);

All schema and routes will be taken from the OpenApi specification listed in the options. No need to specify them in your code.

Options

  • specification: this can be a JSON object, or the name of a JSON or YAML file containing a valid OpenApi(v2/v3) file
  • serviceHandlers: this can be a javascript object or class instance. See the serviceHandlers documentation for more details.
  • securityHandlers: this can be a javascript object or class instance. See the securityHandlers documentation for more details.
  • prefix: this is a string that can be used to prefix the routes, it is passed verbatim to fastify. E.g. if the path to your operation is specified as "/operation" then a prefix of "v1" will make it available at "/v1/operation". This setting overrules any "basePath" setting in a v2 specification. See the servers documentation for more details on using prefix with a v3 specification.
    • operationResolver: a custom operation resolver function, (operationId, method, openapiPath) => handler | routeOptions where method is the uppercase HTTP method (e.g. "GET") and openapiPath is the path taken from the specification without prefix (e.g. "/operation"). Mutually exclusive with serviceHandlers. See the operationResolver documentation for more details.
    • addEmptySchema: a boolean that allows empty bodies schemas to be passed through. This might be useful for status codes like 204 or 304. Default is false.

specification and either serviceHandlers or operationResolver are mandatory, securityHandlers and prefix are optional. See the examples section for a demo.

Please be aware that this will refer to your serviceHandlers object or your securityHandler object and not to Fastify as explained in the bindings documentation

OpenAPI extensions

The OpenAPI specification supports extending an API spec to describe extra functionality that isn't covered by the official specification. Extensions start with x- (e.g., x-myapp-logo) and can contain a primitive, an array, an object, or null.

The following extensions are provided by the plugin:

  • x-fastify-config (object): any properties will be added to the routeOptions.config property of the Fastify route.

    For example, if you wanted to use the fastify-raw-body plugin to compute a checksum of the request body, you could add the following extension to your OpenAPI spec to signal the plugin to specially handle this route:

    paths:
      /webhooks:
        post:
          operationId: processWebhook
          x-fastify-config:
            rawBody: true
          responses:
            204:
              description: Webhook processed successfully
  • x-no-fastify-config (true): this will ignore this specific route as if it was not present in your OpenAPI specification:

  paths:
    /webhooks:
      post:
        operationId: processWebhook
        x-no-fastify-config: true
        responses:
          204:
            description: Webhook processed successfully

You can also set custom OpenAPI extensions (e.g., x-myapp-foo) for use within your app's implementation. These properties are passed through unmodified to the Fastify route on {req,reply}.routeOptions.config. Extensions specified on a schema are also accessible (e.g., routeOptions.schema.body or routeOptions.schema.responses[<statusCode>]).

Generator

To make life even more easy there is the openapi-glue cli. The openapi-glue cli takes a valid OpenApi (v2/v3) file (JSON or YAML) and generates a project including a fastify plugin that you can use on any fastify server, a stub of the serviceHandlers class and a skeleton of a test harness to test the plugin.

Usage

  openapi-glue [options] <OpenApi specification>

or if you don't have openapi-glue installed:

  npx github:seriousme/fastify-openapi-glue <OpenApi specification>

This will generate a project based on the provided OpenApi specification. Any existing files in the project folder will be overwritten! See the generator examples section for a demo.

Options


  -p <name>                   The name of the project to generate
  --projectName=<name>        [default: generated-javascript-project]

  -b <dir> --baseDir=<dir>    Directory to generate the project in.
                              This directory must already exist.
                              [default: "."]

The following options are only usefull for testing the openapi-glue plugin:
  -c --checksumOnly           Don't generate the project on disk but
                              return checksums only.
  -l --localPlugin            Use a local path to the plugin.

See the generator example section for a demo.

Examples

Clone this repository and run npm i

Plugin

Executing npm start will start fastify on localhost port 3000 with the routes extracted from the petstore example and the accompanying serviceHandlers definition

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "params.petId should be integer"
}
{
  "statusCode": 500,
  "error": "Internal Server Error",
  "message": "Operation findPetsByStatus not implemented"
}
{
  "statusCode": 500,
  "error": "Internal Server Error",
  "message":"\"name\" is required!"
}

as the pet returned by service.js does not match the response schema.

Generator

The folder examples/generated-javascript-project contains the result of running openapi-glue -l --baseDir=examples examples/petstore/petstore-swagger.v2.yaml. The generated code can be started using npm start in examples/generated-javascript-project (you will need to run npm i in the generated folder first)

Notes

  • the plugin ignores information in a v3 specification under server/url as there could be multiple values here, use the prefix option if you need to prefix your routes. See the servers documentation for more details.
  • fastify only supports application/json and text/plain out of the box. The default charset is utf-8. If you need to support different content types, you can use the fastify addContentTypeParser API.
  • fastify will by default coerce types, e.g when you expect a number a string like "1" will also pass validation, this can be reconfigured, see Validation and Serialization.
  • the plugin aims to follow fastify and does not compensate for features that are possible according to the OpenApi specification but not possible in standard fastify (without plugins). This will keep the plugin lightweigth and maintainable. E.g. Fastify does not support cookie validation, while OpenApi v3 does.
  • in some cases however, the plugin may be able to provide you with data which could be used to enhance OpenApi support within your own Fastify application. Here is one possible way to perform cookie validation yourself.
  • if you have special needs on querystring handling (e.g. arrays, objects etc) then fastify supports a custom querystring parser. You might need to pass the AJV option coerceTypes: 'array' as an option to Fastify.
  • the plugin is an ECMAscript Module (aka ESM). If you are using Typescript then make sure that you have read: https://www.typescriptlang.org/docs/handbook/esm-node.html to avoid any confusion.
  • If you want to use a specification that consists of multiple files then please check out the page on subschemas
  • Fastify uses AJV strict mode in validating schemas. If you get an error like ....due to error strict mode: unknown keyword: "..." then please check out the page on AJV strict mode
  • Fastify does not support multipart/form-data out of the box. If you want to use it then have a look at: @fastify/multipart.
  • Fastify uses AJV with JSON schema draft-07 out of the box. If you want to use JSON schema draft-2020-12 features in your OpenApi 3.1+ schema then have a look at using JSONschema 2020

Contributing

  • contributions are always welcome.
  • if you plan on submitting new features then please create an issue first to discuss and avoid disappointments.
  • main development is done on the master branch therefore PRs to that branch are preferred.
  • please make sure you have run npm test before you submit a PR.

    Fastify-swaggergen

    Fastify-openapi-glue is the successor to the now deprecated fastify-swaggergen project. Main difference is that it:
  • aims to support OpenApi and not just Swagger V2 (hence the name change)
  • does not include fastify-swagger support anymore. If you need to show the swagger UI you can include it yourself. Removing the swagger UI clears up a number of dependencies.

    License

    Licensed under MIT

changelog

Changelog

[Unreleased]

Changed

[4.9.1] 27-04-2025

Changed

  • doc: added note on using schema 2020
  • chore: updated dependencies
    • @seriousme/openapi-schema-validator ^2.4.0 → ^2.4.1
    • fastify ^5.2.2 → ^5.3.2
    • fastify-cli ^7.3.0 → ^7.4.0
    • minimist replaced by node:util.parseArgs

[4.9.0] 28-03-2025

Changed

  • feature: support multiple MIME types in requestBody and response
  • chore: updated dependencies
    • fastify ^5.2.1 → ^5.2.2

[4.8.1] 21-03-2025

Changed

  • chore: updated dependencies
    • @seriousme/openapi-schema-validator ^2.3.0 → ^2.4.0
    • c8 ^10.1.2 → ^10.1.3
    • fastify ^5.1.0 → ^5.2.1
    • fastify-cli ^7.0.1 → ^7.3.0

[4.8.0] 04-12-2024

Changed

  • feat: export SecurityError

[4.7.4] 26-11-2024

Changed

  • fix: Add await to deterministically finish registering with fastify (dsschneidermann)
  • chore: updated dependencies
    • @seriousme/openapi-schema-validator ^2.2.5 → ^2.3.0

[4.7.3] 14-11-2024

Changed

  • chore: updated dependencies
    • @seriousme/openapi-schema-validator ^2.2.4 → ^2.2.5

[4.7.2] 12-11-2024

Changed

  • chore: updated dependencies
    • @biomejs/biome ^1.9.0 → ^1.9.4
    • @seriousme/openapi-schema-validator ^2.2.3 → ^2.2.4
    • fastify ^5.0.0 → ^5.1.0
    • fastify-cli ^7.0.0 → ^7.0.1
    • fastify-plugin ^5.0.0 → ^5.0.1

[4.7.1] 12-09-2024

Changed

  • fix: support "content" field for query string
  • chore: updated dependencies
    • @biomejs/biome ^1.8.3 → ^1.9.0
    • @seriousme/openapi-schema-validator ^2.2.1 → ^2.2.3

[4.7.0] 07-08-2024

Changed

  • feat: added addCookieSchema option, see docs/cookieValidationHowTo.md (@pcafstockf)
  • chore: updated dependencies
    • @biomejs/biome ^1.8.1 → ^1.8.3
    • fastify ^4.28.0 → ^4.28.1
    • fastify-cli ^6.2.1 → ^6.3.0

[4.6.1] 14-06-2024

Changed

  • fix: fix passing opts in js generator template
  • chore: updated dependencies
    • @biomejs/biome ^1.6.3 → ^1.8.1
    • c8 ^10.1.1 → ^10.1.2
    • fastify ^4.26.2 → ^4.28.0
    • fastify-cli ^6.1.1 → ^6.2.1

[4.6.0] 12-04-2024

Changed

  • feat: added addEmptySchema option, see README.md (ivan-tymoshenko)

[4.5.0] 28-03-2024

Changed

  • feat: add x-no-fastify-config option
  • update: added a note on using subschemas to the documentation
  • chore: removed husky as a dependency
  • updated dependencies
    • @biomejs/biome ^1.5.2 → ^1.6.3
    • @seriousme/openapi-schema-validator ^2.1.5 → ^2.2.1
    • fastify ^4.25.2 → ^4.26.2
    • fastify-cli ^6.0.1 → ^6.1.1

[4.4.3] 19-01-2024

Changed

  • fix: securityHandlers fix for "AND" case
  • fix: remove last traces of TAP from generator templates
  • updated dependencies
    • @biomejs/biome ^1.2.2 → ^1.5.2
    • @seriousme/openapi-schema-validator ^2.1.2 → ^2.1.5
    • c8 ^9.0.0 → ^9.1.0
    • fastify ^4.23.2 → ^4.25.2
    • fastify-cli ^6.0.0 → ^6.0.1

[4.4.2] 14-10-2023

Changed

  • fix: add warning for OpenAPI v3 cookie parameters

[4.4.1] 06-10-2023

Changed

  • no change, fixing latest tag on npmjs

[4.4.0] 04-10-2023

Changed

  • feat: Make initialize on Security Handlers async (AlexBroadbent)
  • updated dependencies
    • @biomejs/biome ^1.1.2 → ^1.2.2
    • @seriousme/openapi-schema-validator ^2.1.1 → ^2.1.2
    • fastify ^4.23.1 → ^4.23.2

[4.3.3] 13-09-2023

Changed

  • chore: replace Rome by Biome
  • fix: removed tap as a dependency
  • fix: replaced deprecated routeOption and routeSchema in documentation and tests
  • updated dependencies
    • @seriousme/openapi-schema-validator ^2.1.0 → ^2.1.1
    • fastify ^4.21.0 → ^4.23.1

[4.3.2] 17-08-2023

Changed

  • fix: make additional validation for v2 non-body parameters work

[4.3.1] 14-08-2023

Changed

  • fix: make generic parameters work on v2 (swagger) spec
  • updated dependencies
    • c8 ^8.0.0 → ^8.0.1
    • fastify ^4.17.0 → ^4.21.0
    • fastify-cli ^5.7.1 → ^5.8.0
    • fastify-plugin ^4.5.0 → ^4.5.1
    • tap ^16.3.6 → ^16.3.8

[4.3.0] 17-06-2023

Changed

  • chore: replaced Tap by Node test
  • update: rename 'service' option to 'serviceHandlers', 'service' still works but gives a deprecation warning.
  • update: expanded documentation

[4.2.0] 09-06-2023

Changed

  • feat: return route options for operationResolver
  • updated dependencies
    • c8 ^7.13.0 → ^7.14.0
    • rome ^12.0.0 → ^12.1.3
    • tap ^16.3.4 → ^16.3.6

[4.1.4] 02-05-2023

Changed

  • fix: replaced context.schema by routeSchema in docs and tests
  • updated dependencies
    • fastify ^4.13.0 → ^4.17.0

[4.1.3] - 05-03-2023

Changed

  • fix: fixed "npm start" behaviour
  • updated dependencies
    • c8 ^7.12.0 → ^7.13.0
    • fastify ^4.11.0 → ^4.13.0
    • minimist ^1.2.7 → ^1.2.8
    • tap ^16.3.3 → ^16.3.4

[4.1.2] - 13-01-2023

Changed

  • chore: replaced Prettier and ESlint by Rome
  • fix: fix query string array handling in V3 parsing
  • updated dependencies:
    • fastify ^4.9.2 → ^4.11.0
    • fastify-cli ^5.5.0 → ^5.7.1
    • fastify-plugin ^4.3.0 → ^4.5.0
    • husky ^8.0.1 → ^8.0.3
    • tap ^16.3.0 → ^16.3.3

[4.1.1] - 24-10-2022

Changed

  • fix: Extend Typescript definitions for operationResolver option with method and path

[4.1.0] - 24-10-2022

Changed

  • feat: Extend operationResolver option with method and path

[4.0.3] - 18-10-2022

Changed

  • fix: remove FSTDEP012 warnings caused by test cases
  • updated dependencies:
    • @seriousme/openapi-schema-validator ^2.0.3 → ^2.1.0
    • eslint ^8.23.0 → ^8.25.0
    • fastify ^4.5.3 → ^4.9.2
    • fastify-cli ^5.4.1 → ^5.5.0
    • fastify-plugin ^4.2.1 → ^4.3.0
    • minimist ^1.2.6 → ^1.2.7

[4.0.2] - 07-10-2022

Changed

  • fix: add default export to package.json

[4.0.1] - 17-09-2022

Changed

  • fix: handle recursive schema correctly
  • updated dependencies:
    • @seriousme/openapi-schema-validator ^2.0.2 → ^2.0.3
    • fastify-plugin ^4.0.0 → ^4.2.1
    • c8 ^7.11.3 → ^7.12.0
    • eslint ^8.18.0 → ^8.23.0
    • eslint-plugin-prettier ^4.1.0 → ^4.2.1
    • fastify ^4.2.0 → ^4.5.3
    • fastify-cli ^5.0.0 → ^5.4.1

[4.0.0] - 29-06-2022

Changed

  • fix: skip security if schemes empty (GuillaumeDeconinck)
  • chore: add lint autoformat (GuillaumeDeconinck)
  • updated dependencies:
    • fastify ^4.0.3 → ^4.2.0
    • fastify-cli ^4.1.1 → ^4.2.0

[3.3.1] - 26-06-2022

Changed

  • fix: make cli working again
  • fix: add operationResolver to Typescript definitions

[3.3.0] - 24-06-2022

Changed

  • feat: custom operation resolver (bluebrown)

[3.2.0] - 18-06-2022

Changed

  • feat: allow custom status code in security handlers

[3.1.0] - 17-06-2022

Changed

  • feat(route): allow passing route config in api spec (mhamann)
  • Updated dependencies: fastify ^4.0.0 → ^4.0.3
    fastify-cli ^4.0.0 → ^4.1.1
    tap ^16.2.0 → ^16.3.0

[3.0.1] - 10-06-2022

Changed

  • Fixed import of fastify-openapi-glue in CommonJS code

[3.0.0] - 09-06-2022

New

  • Support for Fastify 4.x
  • User has full control over AJV behaviour, outside of the plugin.

Changed

  • Migrated to ES Modules format
  • Removed AJV options
  • Service and Securityhandlers options can now only be an object or a class instance and no longer a filename or a function.

See UPGRADING.md for more details on how to upgrade.

[2.8.0] - 06-10-2023

  • Feat: backport async security initializer from 4.4.0

[2.7.2] - 07-06-2022

Changed

  • Fix Typescript definition

[2.7.1] - 06-06-2022

Changed

  • Fix 'defaultAJV' option

[2.7.0] - 03-06-2022

Changed

  • Added 'defaultAJV' option
  • Updated dependencies: fastify-cli ^3.0.1 → ^3.1.0

[2.6.9] - 12-05-2022

Changed

  • Updated dependencies: @seriousme/openapi-schema-validator ^2.0.0 → ^2.0.2
    fastify ^3.28.0 → ^3.29.0
    fastify-cli ^2.15.0 → ^3.0.1
    tap ^16.1.0 → ^16.2.0

[2.6.8] - 25-04-2022

Changed

  • Updated dependencies: @seriousme/openapi-schema-validator ^1.7.1 → ^2.0.0
    tap ^16.0.1 → ^16.1.0

[2.6.7] - 22-04-2022

Changed

  • Deprecation of Nodejs < 14
  • Added Nodejs 18 to CI
  • Updated dependencies: @seriousme/openapi-schema-validator ^1.6.0 → ^1.7.1
    ajv ^8.9.0 → ^8.11.0
    minimist ^1.2.5 → ^1.2.6
    fastify ^3.27.0 → ^3.28.0
    tap ^15.1.6 → ^16.0.1

[2.6.6] - 28-01-2022

Changed

  • Updated dependencies:
    • @seriousme/openapi-schema-validator ^1.3.0 → ^1.6.0
    • ajv ^8.6.2 → ^8.9.0
    • fastify-plugin ^3.0.0 → ^3.0.1
    • fastify ^3.20.2 → ^3.27.0
    • fastify-cli ^2.13.0 → ^2.15.0
    • tap ^15.0.9 → ^15.1.6

[2.6.5] - 29-08-2021

Changed

  • fix(log): debug log of security handlers shows undefined

[2.6.4] - 27-08-2021

Changed

  • fix(log): additional log params get swallowed (mhamann)

[2.6.3] - 16-08-2021

Changed

  • Replaced custom oai-formats by default ajv-formats
  • Updated dependencies:
    • fastify ^3.18.0 → ^3.20.2
    • tap ^15.0.8 → ^15.0.9
    • @seriousme/openapi-schema-validator ^1.1.5 → ^1.3.0
    • ajv ^8.6.0 → ^8.6.2
    • ajv-formats ^2.1.0 → ^2.1.1

[2.6.2] - 25-06-2021

Changed

  • Updated dependencies:
    • fastify ^3.15.0 → ^3.18.0
    • fastify-cli ^2.9.1 → ^2.13.0
    • tap ^15.0.4 → ^15.0.8
    • @seriousme/openapi-schema-validator ^1.1.2 → ^1.1.5
    • ajv ^8.1.0 → ^8.6.0
    • ajv-formats ^2.0.2 → ^2.1.0

[2.6.1] - 05-06-2021

Changed

  • Fixed makeOperation so "get /user/{name}" becomes getUserByName as it used to

[2.6.0] - 15-05-2021

Changed

  • Replaced @apidevtools/swagger-parser by @seriousme/openapi-schema-validator
  • Added support for OpenApi 3.1

[2.5.1] - 12-05-2021

Changed

  • Fix: formats ajv error to include property names (kutyepov)

[2.5.0] - 29-04-2021

Changed

  • Added support for objects in querystring

[2.4.1] - 23-04-2021

Changed

  • Removed dependency on decimal.js-light
  • Fixed bug in validation of 'Byte' format
  • Updated dependencies:
    • ajv ^7.0.3 → ^8.1.0
    • ajv-formats ^1.5.1 → ^2.0.2
    • fastify ^3.10.1 → ^3.15.0
    • fastify-cli ^2.7.0 → ^2.9.1
    • js-yaml ^4.0.0 → ^4.1.0
    • tap ^14.11.0 → ^15.0.4

[2.4.0] - 24-01-2021

Changed

  • Removed dependency on ajv-oai
  • Removed workaround for hasContentTypeParser
  • Added AJV formats for 'binary' and 'password' to reduce warnings
  • Updated dependencies:
    • ajv ^6.12.6 → ^7.0.3
    • js-yaml ^3.14.1 → ^4.0.0
    • fastify ^3.9.2 → ^3.10.1

[2.3.1] - 30-12-2020

Changed

  • Updated dependencies:
    • js-yaml ^3.14.0 → ^3.14.1
    • fastify ^3.8.0 → ^3.9.2
    • fastify-cli ^2.5.1 → ^2.7.0
    • tap ^14.10.8 → ^14.11.0

[2.3.0] - 10-10-2020

Changed

  • Added ES6 module support for service.js and security.js
  • Updated dependencies:
    • fastify ^3.7.0 → ^3.8.0

[2.2.2] - 24-10-2020

Changed

  • Added types property to package.json
  • Updated dependencies:
    • ajv ^6.12.5 → ^6.12.6
    • ajv-oai ^1.2.0 → ^1.2.1
    • fastify ^3.4.1 → ^3.7.0
    • fastify-cli ^2.2.0 → ^2.5.1

[2.2.1] - 20-09-2020

Changed

  • Fixed missing slash in generator template
  • Updated dependencies:
    • ajv ^6.12.4 → ^6.12.5
    • fastify-plugin ^2.3.1 → ^2.3.4
    • swagger-parser ^10.0.1 → ^10.0.2
    • fastify ^3.2.1 → ^3.4.1

[2.2.0] - 20-08-2020

Changed

  • Added "x-" properties to the fastify reply context
  • Updated dependencies:
    • ajv ^6.12.3 → ^6.12.4
    • fastify-plugin ^2.3.0 → ^2.3.1
    • fastify ^3.2.0 → ^3.2.1
    • fastify-cli ^2.1.0 → ^2.2.0

[2.1.0] - 14-08-2020

Changed

  • Enable passthrough of security handler errors (mhamann)
  • Added parameters and initializer to securityHandlers (see docs/securityHandlers.md)
  • Refactored index.js and parsers
  • Updated examples to v3
  • Added tests
  • Updated dependencies:
    • fastify-plugin ^2.0.0 → ^2.3.0
    • swagger-parser ^10.0.0 → ^10.0.1
    • fastify ^3.0.0 → ^3.2.0
    • fastify-cli ^2.0.2 → ^2.1.0
    • tap ^14.10.7 → ^14.10.8

[2.0.5] - 06-08-2020

Changed

  • Warnings for missing content handlers now go to the fastify log
  • Bump fastify-plugin from 2.0.2 to 2.1.1

[2.0.4] - 28-07-2020

Changed

  • Fix stripResponseFormats for recursive schemas (lundibundi)
  • Bump fastify-plugin from 2.0.1 to 2.0.2
  • Bump tap from 14.10.7 to 14.10.8

[2.0.3] - 20-07-2020

Changed

  • Bump fastify from 3.0.3 to 3.1.1
  • Bump swagger-parser from 10.0.0 to 10.0.
  • Fixed typescript definitions (zekth)

[2.0.2] - 16-07-2020

Changed

  • Just a version bump to fix operator error

[2.0.1] - 16-07-2020

Changed

  • Bump fastify from 3.0.0 to 3.0.3
  • Bump swagger-parser from 9.0.1 to 10.0.
  • Bump fastify-plugin from 2.0.0 to 2.0.1
  • [Security] Bump lodash from 4.17.15 to 4.17.19

[2.0.0] 11-07-2020

Changed

  • Migrated to fastify 3.0.0, major version as the change is not compatible with fastify 2.x.y.

[1.7.1] 09-07-2020

Changed

  • Made securityHandlers parameter optional in Typescript signature

[1.7.0] 08-07-2020

Changed

  • Added securityHandlers parameter (mhamann)
  • Updated dependencies
    • ajv ^6.12.2 → ^6.12.3
    • js-yaml ^3.13.1 → ^3.14.0
    • fastify ^2.13.1 → ^2.15.1

[1.6.0] 17-06-2020

Changed

  • Added ajvOptions parameter (justinsc )

[1.5.2] 23-04-2020

Changed

  • Added Typescript definitions (Xaver Schulz)
  • Fixed loss of 'this' in service.js (Xaver Schulz)
  • Updated dependencies
    • ajv ^6.12.0 → ^6.12.2
    • fastify ^2.13.0 → ^2.13.1

      [1.5.1] 06-04-2020

      Changed

    • Updated dependencies
    • ajv ^6.11.0 → ^6.12.0
    • fastify-plugin ^1.6.0 → ^1.6.1
    • minimist ^1.2.0 → ^1.2.5
    • swagger-parser ^9.0.0 → ^9.0.1
    • fastify ^2.11.0 → ^2.13.0
    • fastify-cli ^1.3.0 → ^1.5.0
    • tap ^14.10.6 → ^14.10.7

[1.5.0] 31-01-2020

Changed

  • Added noAdditional option

[1.4.0] 21-01-2020

Changed

  • Added nullable flag to ajv config
  • Updated dependencies
    • ajv ^6.10.2 → ^6.11.0
    • ajv-oai ^1.1.5 → ^1.2.0
    • swagger-parser ^8.0.3 → ^8.0.4
    • fastify ^2.10.0 → ^2.11.0
    • tap ^14.10.2 → ^14.10.6

[1.3.1] 29-11-2019

Changed

  • Fixed bug in Petshop example
  • Updated dependencies:
    • swagger-parser ^8.0.2 → ^8.0.3
    • ajv-oai ^1.1.1 → ^1.1.5
    • tap ^14.7.1 → ^14.10.2

[1.3.0] 16-10-2019

Changed

  • Enabled async service creation
  • Updated dependencies:
    • swagger-parser ^8.0.0 → ^8.0.2
    • fastify ^2.6.0 → ^2.10.0
    • fastify-cli ^1.1.0 → ^1.3.0
    • tap ^14.4.2 → ^14.7.1

      [v1.2.0] 19-07-2019

      Changed

  • enabled generic parameters on path items
  • Added notes section to README.md to explain plugin behaviour better
  • Updated dependencies:
    • swagger-parser ^7.0.1 → ^8.0.0
    • fastify-plugin ^1.5.0 → ^1.6.0
    • fastify ^2.2.0 → ^2.6.0
    • fastify-cli ^1.0.0 → ^1.1.0
    • tap ^14.0.0 → ^14.4.2

      [v1.1.0] 14-06-2019

      Added

  • prefix option, see README.md
  • CHANGES.md

    [v1.0.6]

    Changed

  • Updated dependencies

    [v1.0.5]

    Changed

    • Updated dependencies

      [v1.0.4] 30-11-2018

      Changed

    • Fixed handling of no parameters on V2

      [v1.0.3]

      Changed

    • Updated dependencies

      [v1.0.1]

      Changed

    • Updated dependencies

      [v1.0.0] 30-06-2018

      Initial version