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.

url fields cannot have url parameter in config

See original GitHub issue

As per schema, method fields are not allowed to have additional properties. Which is fine in general, but causes error message when using the url parameter of url fields [1] although it can be used according to the respective code ([2], [3]). The page also renders perfectly fine and formats the url with the expected value.

My first thought was to just change the schema to either allow additional properties or to include the url parameter. But to be honest: I don’t like either of those. Instead, I tried to create some conditional dependency in the schema based on the the value of the type field but I did not manage to make that working (aside from that fact that this created way more JSON schema than I am willing to accept personally).

So, if anyone has an idea on how to fix this, I would be glad for input. Thanks in advance!

[1]

"fields": [
    // [...]
    {
        "name": "someValue",
        "type": "url",
        "label": "External",
        "url": "http://example.com/products/:someValue"
    }
]

[2] https://github.com/dsternlicht/RESTool/blob/f7b6e0283eba38eb7aa76f8c3acf4bafc8ccd61b/src/components/table/table.comp.tsx#L35 [3] https://github.com/dsternlicht/RESTool/blob/f7b6e0283eba38eb7aa76f8c3acf4bafc8ccd61b/src/components/cards/cards.comp.tsx#L38

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lucebaccommented, May 11, 2020

I added some docu in #126

1reaction
lucebaccommented, May 11, 2020

Thanks for the heads-up 😃 I skimmed over the changes prior to experiencing this problem and did not remember that is was already fixed upstream.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the recommended way to pass urls as url parameters?
I ran into this issue, personally I couldn't use any of the accepted answers, but it can also be done by just encoding...
Read more >
Cannot make URL query string with a parameter without a value
URL query string may contain a parameter, which has no value i.e. http://host/path/?foo or http://host/path/?a=1&foo.
Read more >
An SEO Guide to URL Parameter Handling
URL parameters create duplicate content, waste crawl budget, and dilute ranking signals. Learn six ways to avoid potential SEO issues with ...
Read more >
Parameters - Looker Studio Help - Google Help
Setting parameters via the report's URL lets developers and advanced users to construct reports that can be configured programmatically.
Read more >
apex - Can't get URL Parameter - Salesforce Stack Exchange
When your Visualforce page is rendered inside the standard record view, it will be passed the id of the current record as a...
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