-
-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
Description
Describe the Bug
The swagger UI always shows the parameter type any.
Steps To Reproduce
Steps to reproduce the behavior:
Import-Module Pode
# create a server, and start listening on port 8080
Start-PodeServer {
Add-PodeEndpoint -Address localhost -Port 8080 -Protocol Http
Enable-PodeOpenApi
Add-PodeOAInfo -Title 'MVE API' -Version '1.0.0'
Enable-PodeOpenApiViewer -Type Swagger -Path '/'
Add-PodeRoute -Method Get -Path '/ping' -ScriptBlock {
Write-PodeJsonResponse -Value @{
message = 'pong'
timestamp = (Get-Date).ToString('yyyy-MM-dd HH:mm:ss')
}
} -PassThru | Set-PodeOARouteInfo -Summary 'Bugs' -Tags 'Bug' -PassThru |
Set-PodeOARequest -Parameters @(
(New-PodeOAStringProperty -Name 'hostname' -Description 'hostname' -Required),
(New-PodeOAIntProperty -Name 'counter' -Description 'number')
)
}
Expected Behavior
I would expect New-PodeOAIntProperty and New-PodeOAStringProperty to show as an Integer and a String in the swagger definition.
Screenshots
Platform
- OS: Windows, macOS
- Browser: Chrome, Arc
- Versions:
- Pode: v2.12.1
- PowerShell: 7.5.1
Metadata
Metadata
Assignees
Labels
Projects
Status
Done