fastify / fastify/fastify-swagger-ui

Allow adding 'config' on the routes added by Swagger-UI

Open
#218 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
191
Forks
46
Avg merge
12h 12m
Merged PRs (30d)
2

Description

### Prerequisites

- [x] I have written a descriptive issue title
- [x] I have searched existing issues to ensure the feature has not already been requested

### 🚀 Feature Proposal

I want to be able to add stuff to the Fastify route config object for the routes added by the swagger-ui plugin, so I can access the config in request.routeOptions.config

Because this isn't currently possible, I'm resorting to registering an 'onRoute' hook before registering the swagger(-ui) plugins, but this hook then remains and as Fastify doesn't allow removing hooks

### Motivation

_No response_

### Example

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.