Skip to content

Fix UUID array query params to use format-aware conversion - #281

Closed
zupo wants to merge 2 commits into
wolfadex:mainfrom
zupo:main
Closed

zupo wants to merge 2 commits into
wolfadex:mainfrom
zupo:main

Conversation

@zupo

@zupo zupo commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

The Common.List (Common.Basic ...) branch in paramToString was ignoring the format field, so UUID arrays used plain string identity instead of Uuid.toString. Now uses CliMonad.withFormat like the non-list Basic case.

Add test, example spec, and TestGenScript entry for uuid-array-param.

The Common.List (Common.Basic ...) branch in paramToString was ignoring
the format field, so UUID arrays used plain string identity instead of
Uuid.toString. Now uses CliMonad.withFormat like the non-list Basic case.

Add test, example spec, and TestGenScript entry for uuid-array-param.
@zupo

zupo commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

Don't merge yet, I just found it's failing on a complex spec, I'm bisecting to get to the bottom of it.

@zupo

zupo commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor Author

False alarm. The generator crashed due to a combination of elm-pages update and using --optimize 2 instead of --optimize 1, and it was crashing even without this commit, so unrelated.

Merge path item parameters with operation parameters per the OpenAPI
spec. Previously, parameters defined at the path level (shared across
all operations) were silently ignored, causing path params like {orgId}
to appear as literal strings in generated URLs.
Comment thread cli/src/TestGenScript.elm Resolved
Comment on lines +847 to +860
let
trimTrailingWhitespace : String -> String
trimTrailingWhitespace =
String.lines >> List.map String.trimRight >> String.join "\n"

normalizedExp : String
normalizedExp =
trimTrailingWhitespace exp

normalizedActual : String
normalizedActual =
trimTrailingWhitespace actual
in
if normalizedExp == normalizedActual then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love this? I think I'd prefer to keep the trailing whitespace in the actual tbh?

@zupo

zupo commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor Author

I need to move this fix to a dedicated branch instead of main so I can do more PRs in paralel.

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.

3 participants