Skip to content

fix(generator): handle relative URIs in UriScheme validation#47

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/url-error-message
May 7, 2026
Merged

fix(generator): handle relative URIs in UriScheme validation#47
Mpdreamz merged 1 commit into
mainfrom
fix/url-error-message

Conversation

@Mpdreamz
Copy link
Copy Markdown
Contributor

@Mpdreamz Mpdreamz commented May 7, 2026

Summary

  • add an integration regression test for validate-uri-scheme --endpoint not-an-url to capture the reported crash path
  • update UriScheme validation codegen to treat non-absolute URIs as invalid and avoid reading .Scheme on relative URIs
  • preserve existing user-facing validation output (URI scheme must be one of: ...) with clean exit code 2

Test plan

  • dotnet test tests/Nullean.Argh.IntegrationTests/ -c Release --filter \"FullyQualifiedName~ValidationAnnotationTests.UriScheme_\"
  • dotnet run --project tests/Nullean.Argh.Tests.CliHost/ -c Release -- validate-uri-scheme --endpoint not-an-url

Made with Cursor

Treat non-absolute Uri values as validation failures for UriScheme constraints so invalid URL-like input exits cleanly with code 2 instead of throwing. Add an integration test that reproduces the reported `not-an-url` crash case.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Mpdreamz Mpdreamz merged commit 448040f into main May 7, 2026
4 checks passed
@Mpdreamz Mpdreamz deleted the fix/url-error-message branch May 7, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant