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 function doesn't seem to capture missing path parameters in operations #207

Closed
TristanSpeakEasy opened this issue Dec 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@TristanSpeakEasy
Copy link
Contributor

This doc:

openapi: 3.0.3
info:
  title: Test
  version: 0.0.1
  description: A test API
servers:
  - url: https://example.com
security:
  - basicAuth: []
tags:
  - name: tag1
paths:
  /update/{something}:
    post:
      operationId: postSomething
      summary: Post something
      tags:
        - tag1
      responses:
        '200':
          description: Post OK
    get:
      operationId: getSomething
      summary: Get something
      tags:
        - tag1
      responses:
        '200':
          description: Get OK
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

returns this result from vacuum:

vacuum lint ../openapi-specs/path-param-test.yaml -d

INFO  Linting against 42 rules: https://quobix.com/vacuum/rulesets/recommended

Linting passed, A perfect score! well done!

looking at the code I can see there is a check to detect the fact there is no path param defined for {something} but it doesn't seem to be catching that it isn't defined

@daveshanley
Copy link
Owner

Hmm.. i'll look into this asap.

@daveshanley daveshanley self-assigned this Dec 15, 2022
@daveshanley daveshanley added the bug Something isn't working label Dec 15, 2022
daveshanley added a commit that referenced this issue Dec 16, 2022
A missing check for available path params has been added.
daveshanley added a commit that referenced this issue Dec 16, 2022
A missing check for available path params has been added.
@daveshanley
Copy link
Owner

This should be fixed in v0.0.44

@TristanSpeakEasy
Copy link
Contributor Author

can confirm it is fixed

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