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.

x-zally-ignore doesn't work for some rules

See original GitHub issue

Example / how to reproduce Lint the following specification:

swagger: '2.0'

info:
  title: Some API
  version: '1.0.0'
  contact:
    name: Team X
    email: team@x.com
    url: https://team.x.com

parameters:
  SNSMessageTypeHeader:
    name: X-Amz-Sns-Message-Type
    in: header
    type: string
    x-extensible-enum:
      - Notification
      - SubscriptionConfirmation
    description: header describing the type of SNS message
    required: true

paths:
  '/sns':
    post:
      x-zally-ignore:
        - '183' # this endpoint must return custom header (SNS requirement)
      summary: Deliver SNS notification
      consumes:
        - 'text/plain'
      operationId: 'postSNSMessage'
      tags:
        - SNS
      parameters:
        - $ref: '#/parameters/SNSMessageTypeHeader'
      responses:
        401:
          description: Could not read sns message
          headers:
            WWW-Authenticate:
              type: string
              default: Basic realm="sns"
        default:
          description: a specific error occurred - see status code for more information.
          schema:
            $ref: 'https://zalando.github.io/problem/schema.yaml#/Problem'

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
roxspringcommented, Aug 16, 2018

Developers will already be aware of this but for the benefit of other readers the x-zally-ignore extension should now be usable at arbitrary locations within the definition but only for rules which have been updated to use the Context. Currently some rules have been converted under #714 but many are still to be converted. Until all rules are using Context then x-zally-ignore in arbitrary locations not expected to work universally.

All that said, 183 has already been converted to use Context hence the bug…

0reactions
roxspringcommented, Sep 22, 2018

Got it. See #853 pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XmlIgnore not working - Stack Overflow
I believe XMLIgnore attribute should be used to decorate a public member of a class which has been decorated with XmlSerializable attribute, ...
Read more >
Option to ignore versions in pom.xml without need for Rules.xml
I think it would be convenient if I could specify versions to ignore directly in pom.xml under the configuration tag.
Read more >
What You Need to Know About Whitespace in XML - Oracle
You may notice that the whitespaces are not stripped if the XML elements has xml:space=" preserved" . This behavior is based on the...
Read more >
Psalm doesn't respect "ignoreFiles" psalm.xml config directive
Configure the Psalm inspection using this config file. Notice that the inspection still runs on files specified in ignoreFiles .
Read more >
How to Exclude Source When Syncing or Converting
How Salesforce Developer Experience Changes the Way You Work ... when parsing the .forceignore file, use the same rules and patterns as the...
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