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.

Parameter consistency: change URL to Uri

See original GitHub issue

Summary of the new feature / enhancement

As a PS user who benefits from consistency in parameter names across modules,

  • when I run Register-PSResourceRepository
    • I want to provide the URL to a parameter called Uri (not URL)
    • I want the param type to be [uri] (as for Invoke-RestMethod / Invoke-WebRequest),
  • so that
    • I can discover the usage of the command more easily
    • I can re-use splats
    • I get validation by casting string to uri

Proposed technical implementation details (optional)

  • Simple rename in src/code/SetPSResourceRepository.cs and RegisterPSResourceRepository.cs
  • I propose no alias; we’re still pre-release
  • irm/iwr declare the param as follows:
    [Parameter(Mandatory=$true, Position=0)]
    [ValidateNotNullOrEmpty()]
    [uri]
    ${Uri},

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
PaulHigincommented, Nov 10, 2021

@anamnavi The two effective commands are:

Register-PSResourceRepository Set-PSResourceRepository

But we also need to be consistent with our error/warning/verbose messages to use Uri instead of Url. Also, we should rename all internal methods and parameters to use Uri.

1reaction
StevenBucher98commented, Aug 12, 2021

That sounds good @fsackur! We’d appreciate that PR, feel free to submit it whenever you’d like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Beginner's Guide to URL Parameters
Poorly structured, passive URL parameters that don't change the content on the page can create endless URLs with the same content.
Read more >
c# - How to replace url-parameter?
The most robust way would be to use the Uri class to parse the string, change te param values and then build the...
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 >
Easy URL manipulation with URLSearchParams
To make actual changes to the URL, you can grab parameters, update their values, then use history.replaceState to update the URL. // URL:...
Read more >
Append parameter to URL accross all pages - Drupal Answers
My idea is to use Rules to catch the current country code and append that same parameter to all links on the menu,...
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