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

OpenAPI route parameter definitions issue in v2.11.1 #1450

Closed
jsg91 opened this issue Nov 7, 2024 · 1 comment · Fixed by #1454
Closed

OpenAPI route parameter definitions issue in v2.11.1 #1450

jsg91 opened this issue Nov 7, 2024 · 1 comment · Fixed by #1454
Labels

Comments

@jsg91
Copy link

jsg91 commented Nov 7, 2024

Describe the Bug

Not sure where the issue lies, the example from the documentation works in v2.11.0 but no longer in v2.11.1.

Steps To Reproduce

  1. Copy https://badgerati.github.io/Pode/Tutorials/OpenAPI/1Overview/#requests -> Parameters-> first example to your v2.11.1 instance
  2. Check OpenAPI definition (/docs/openapi), it won't be there
  3. Change to v2.11.0, it will be there
    ... no Error to be found anywhere (at least with IIS and ErrorLog catches everywhere)

Expected Behavior

OpenAPI definition won't include that route in v2.11.1, while does in v2.11.0

Platform

PowerShell 7.4.5 w IIS

@mdaneri
Copy link
Contributor

mdaneri commented Nov 13, 2024

Fixed by #1454

if you need a quick fix, change line 455 of the file public/Route.ps1:

if ($PodeContext.Server.OpenAPI.Routes -notcontains $OpenApiPath ) {
    $PodeContext.Server.OpenAPI.Routes += $OpenApiPath
}

To:

if ($PodeContext.Server.OpenAPI.Routes -notcontains $Path ) {
    $PodeContext.Server.OpenAPI.Routes += $Path
}

@Badgerati Badgerati linked a pull request Nov 22, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Backlog to Done in 🚀 Pode Roadmap Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants