seriousme / fastify-openapi-glue

A plugin for the Fastify webserver to autogenerate a Fastify configuration based on a OpenApi(v2/v3) specification.
MIT License
202 stars 34 forks source link

Make initialize on Security Handlers async #518

Closed AlexBroadbent closed 11 months ago

AlexBroadbent commented 11 months ago

Update initialize(schemes) to be async initialize(schemes) and await the result when setting up the service.

This means that users can perform an asynchronous task before the service starts.

AlexBroadbent commented 11 months ago

@seriousme I've hit a snag where I need to await the result of the initialize function, I've made the change to support it and updated the documentation.

seriousme commented 11 months ago

Thanks !

seriousme commented 11 months ago

Published as 4.4.0 on NPM

AlexBroadbent commented 11 months ago

@seriousme Could this be back-ported to 2.6.7? I'm on an older version due as I can't upgrade to ESM yet, I've made the changes against the tag, but I can't push a PR from my fork.

seriousme commented 11 months ago

The lastest 2.x is 2.7.2, are you ok if backport it into 2.8.0 ?

Kind regards, Hans

AlexBroadbent commented 11 months ago

Thanks @seriousme

seriousme commented 11 months ago

Backport is published as 2.8.0 on NPM