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

fastify@4.x deprecation notice (FSTDEP012) "Request#context will be removed in `fastify@5` #472

Closed freakyfelt closed 1 year ago

freakyfelt commented 1 year ago

I'm playing with fastify-openapi-glue and noticed a deprecation warning is emitted when accessing Request#context noting that it will be removed in fastify 5.x. Are there plans for addressing that and, if so, anything people can do to help?

(node:43644) [FSTDEP012] FastifyDeprecation: Request#context property access is deprecated. Please use "Request#routeConfig" or "Request#routeSchema" instead for accessing Route settings. The "Request#context" will be removed in `fastify@5`.
freakyfelt commented 1 year ago

Actually since this is only coming up when accessing the route.context.config it might just be updating the docs to use route.routeConfig

seriousme commented 1 year ago

Hi,

thanks for reporting this. I have updated the docs and the two tests that relied on context.schema.

Kind regards, Hans

seriousme commented 1 year ago

FYI: Released as v4.1.4

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'