-
-
Notifications
You must be signed in to change notification settings - Fork 268
Open
Description
Describe the bug
Moving parameters from operation level to path level causes Nimma error.
To Reproduce
- Take Petstore API specification as the base https://github.com/OpenAPITools/openapi-petstore/blob/master/src/main/resources/openapi.yaml
- From/user/{username} path move path parameter definition from get operation to path level. You should have code like below.
/user/{username}:
parameters:
- name: username
in: path
description: The name that needs to be fetched. Use user1 for testing.
required: true
style: simple
explode: false
schema:
type: string
get:
tags:
- user
summary: Get user by user name
operationId: getUserByName
responses:
200:
description: successful operation
content:
application/xml:
schema:
$ref: '#/components/schemas/User'
application/json:
schema:
$ref: '#/components/schemas/User'
400:
description: Invalid username supplied
404:
description: User not found
x-accepts: application/json
x-tags:
- tag: user
- Run this CLI command
npx lint-openapi openapi.yaml - See error
[ERROR] There was a problem with spectral.
[ERROR] Error running Nimma
[ERROR] Additional error details:
[ERROR] Cause: the entity at location paths./user/{username}.parameters must be a schema object
[ERROR] At: location paths./user/{username}.parameters must be a schema object
Expected behavior
I expect to see validation output like some validation errors and warnings, but instead I get "Error running Nimma"
Environment:
- OS: MacOS 26.0.1
Metadata
Metadata
Assignees
Labels
No labels