Add support for top level parameters
Is your feature request related to a problem? Please describe. It doesn't seem as though defining params at the top level currently works, only at the API route level.
Describe the solution you'd like
It would be nice to follow the current convention and just allow for @Param tags to work at the top level.
As an example, this is more or less what I'm trying to emulate:
swagger: "2.0"
info:
description: |
This is a swagger defenition for [Telegram bot API](https://core.telegram.org/bots/api).
version: "3.6"
title: Telegram bot API
externalDocs:
description: Find out more about Telegram bot API
url: https://core.telegram.org/bots/api
host: api.telegram.org
schemes:
- https
consumes:
- application/json
produces:
- application/json
basePath: /
parameters:
token:
in: path
name: token
required: false
type: string
description: bot's token to authorize the request
Describe alternatives you've considered Manually editing the generated docs or adding the parameters to each individual route seem to be the only solutions for now, unless I'm missing something and this is already possible.
Not sure about your use case , usually having a global defined parameter will end up adding exclusions in different routes instead of defining it where it is required. This is an OOS project and you can contribute with an PR if this change would make your life easier.