-
-
Notifications
You must be signed in to change notification settings - Fork 638
Open
Labels
Description
Environment
Nitro 2.12.4
Node v22.13.1
Reproduction
Step 1:
use definePageMeta
in any route.
Step 2:
make sure that openAPI
object contains parameters
array, even if empty.
/api/{projectId}/index.get.ts
openAPI: {
description: 'Get a specific project by ID',
tags: ['projects'],
summary: 'Get project by ID',
operationId: 'getProjectById',
parameters: [],
}
Step 3:
Open swagger docs and notice that path variable is not auto-populated.
Describe the bug
Nitro has this feature of auto detecting API path variables and populating them as path parameters in Open API spec. However, this feature is not working as intended.
Additional context
This can be easily fixed. Just use DEFU!!!