question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Path parameter case false-positive

See original GitHub issue

Zally produces this violation:

Path parameter 'business-partner-id' does not match snake_case ([a-z][a-z0-9]*(?:_[a-z0-9]+)*) but seems to be kebab-case

for the following specificaiton:

'/item-quantity-snapshots/{business-partner-id}':
    get:
      description: |
        Returns most recent item quantity snapshot of a given partner.
      security:
        - oauth2: [zfs-inventory.item-quantity.read]
      parameters:
        - name: business-partner-id
          in: path
          required: true
          type: string
          format: uuid
          description: |
            UUID identifing the business partner.

The Guideline explicitely allows such path parameter names.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maxim-tschumakcommented, Nov 1, 2018

Are you suggesting that we merge regex and whitelist into a single list of allowed patterns, with all of them appearing in the message?

Yes, I would go for this.

1reaction
maxim-tschumakcommented, Nov 1, 2018

How do you feel about the following alternative:

pathParameterNames {
  allow: [
    ${CaseChecker.cases.kebab-case},
    ${CaseChecker.cases.snake_case}
  ]
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

False positives - CodeChecker - Read the Docs
Having a false positive indicates that the analyzer does not understand some properties of the code. Suppressing a result will not help its...
Read more >
C#: False positive variable is null on at least one execution path
I have a piece of code that looks like this: public int Compare(... left, ... right) { string leftName = ...; string rightName...
Read more >
False Discoveries Occur Early on the Lasso Path
Lasso path the type I error (false positive rate) will need to exceed a ... possibly adaptive selection of the Lasso regularizing parameter....
Read more >
path-segment-plural - Redocly
As your API grows, you'll likely hit some false positives and may also need to ignore a few outliers. That is, unless you're...
Read more >
False Positives - golangci-lint
Table of Contents. Specific Linter Excludes; Exclude or Skip; Exclude Issue by Text; Exclude Issues by Path; Nolint Directive; Default Exclusions; EXC0001 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found