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

Path parameters render incorrectly #248

Closed
szechyjs opened this issue Oct 13, 2023 · 2 comments
Closed

Path parameters render incorrectly #248

szechyjs opened this issue Oct 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@szechyjs
Copy link

The spec allows parameters to be defined on each operation or at the path level. When using them at the path level, like below. Scalar attempts to parse/render the parameters as a method/operation, instead of applying the parameters to every operation under that path.

openapi: '3.0.2'
info:
  title: Broken Params
  version: '1.0'
paths:
  /items/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      summary: Get Item
    put:
      summary: Update Item
    delete:
      summary: Delete Item
Screenshot 2023-10-13 at 2 57 56 PM Screenshot 2023-10-13 at 3 00 48 PM
@hanspagel
Copy link
Member

Ah, great find! 🙌 Thanks for the bug report.

@hanspagel hanspagel added the bug Something isn't working label Oct 13, 2023
@hanspagel
Copy link
Member

hanspagel commented Oct 16, 2023

Fixed in #261. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants