Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for top level parameters #1968

Open
watzon opened this issue Jan 28, 2025 · 0 comments
Open

Add support for top level parameters #1968

watzon opened this issue Jan 28, 2025 · 0 comments

Comments

@watzon
Copy link

watzon commented Jan 28, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant