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.

Unable to remove query parameters in visitor

See original GitHub issue

Describe the bug Unable to remove query parameters in visitor.

To Reproduce Attempted to remove query parameters using a visitor.

    'remove-hidden-parameters': () => {
      return {
        Parameter: {
          leave(parameter, ctx) {
            if (parameter['x-hidden']) {
              delete ctx.parent[ctx.key];
            }
          }
        }
      }

Expected behavior Expected query parameters with x-hidden: true to be removed.

Actual behavior

YAMLException: unacceptable kind of an object to dump [object Undefined]
    at writeNode (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:779:13)
    at writeBlockSequence (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:542:9)
    at writeNode (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:763:9)
    at writeBlockMapping (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:657:10)
    at writeNode (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:750:9)
    at writeBlockMapping (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:657:10)
    at writeNode (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:750:9)
    at writeBlockMapping (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:657:10)
    at writeNode (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:750:9)
    at writeBlockMapping (/usr/local/lib/node_modules/@redocly/openapi-cli/node_modules/js-yaml/lib/js-yaml/dumper.js:657:10) {
  reason: 'unacceptable kind of an object to dump [object Undefined]',
  mark: undefined
}

openapi-cli Version(s) What version of openapi-cli are you using? 1.0.0-beta.18

Node.js Version(s) v14.14.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
siriannicommented, Oct 26, 2021

Thanks for the reply and suggestion @slavikbez . I have been busy but will give it a try and report back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to remove a query parameter from a query string
In Android, without import any library. I write a util method inspired by this answer Replace query parameters in Uri.Builder in Android?
Read more >
How To Exclude URL Query Parameters in Google Analytics
One way to remove query parameters from pages is through the View Settings. Under Admin > View Settings > Exclude Query Parameters, ...
Read more >
How to Exclude Query String Parameters from Google ... - Elevar
Option 1: Create Filter to Exclude All Query Parameters · Option 2: Use Exclude Query Parameters Config Setting · More Google Analytics Tips...
Read more >
Cannot Delete Query/Parameter/Table
Hi, I have this query entry that I cannot delete. This query was originally belonged to a number of queries created when entering...
Read more >
Cannot remove query parameters when rerouting ... - GitHub
Minimal reproducible example. A view which gets a query parameter and throws an exception: @Route class MainView extends Div implements ...
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