Skip to content

use collect instead of map in maybeAsAnonymousType #588

Merged
lbialy merged 4 commits into
mainfrom
fix-codegen-match-error-on-ref-type
Mar 20, 2026
Merged

use collect instead of map in maybeAsAnonymousType #588
lbialy merged 4 commits into
mainfrom
fix-codegen-match-error-on-ref-type

Conversation

@lbialy

@lbialy lbialy commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

this allows codegen to handle unrecognized type values

Some provider schemas set type field to non-standard values like "ref" alongside $ref. Using map caused a MatchError, collect correctly returns None for unmatched cases.

fixes an issue reported by user

lbialy added 4 commits March 19, 2026 12:42
…ized type values

Some provider schemas set type field to non-standard values like "ref" alongside $ref.
Using map caused a MatchError, collect correctly returns None for unmatched cases.
httpbun.org is down, causing nil pointer panic in purrl provider and
failing all CI PRs. Start a local HttpServer on a random port in test
setup, pass URL via TEST_HTTP_SERVER_URL env var, stop in teardown.
@lbialy lbialy merged commit 632129c into main Mar 20, 2026
6 checks passed
@lbialy lbialy deleted the fix-codegen-match-error-on-ref-type branch March 20, 2026 14:36
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