Skip to content

Conversation

@bopm
Copy link
Contributor

@bopm bopm commented Jul 1, 2025

This commit introduces changes to OpenApiSpex.CastParameters and OpenApiSpexTest.Schemas to support OTP-28

  • Moved @default_parsers to a private function default_parsers/0 in OpenApiSpex.CastParameters to ensure it's evaluated at runtime, preventing potential compilation issues with OpenApi.json_encoder().
  • Updated the pattern definition in OpenApiSpexTest.Schemas to use a string literal instead of a regex literal for consistency and to avoid potential issues with regex compilation.

Fix: Adjust string pattern test assertion

Following the refactoring, a test in OpenApiSpex.CastStringTest failed due to a change in how regex patterns were handled. This fix corrects the assertion for string pattern matching to compare the source of the regex instead of the regex struct directly, resolving the test failure.

bopm and others added 2 commits July 1, 2025 19:07
This commit introduces changes to `OpenApiSpex.CastParameters` and `OpenApiSpexTest.Schemas`.

- Moved `@default_parsers` to a private function `default_parsers/0` in `OpenApiSpex.CastParameters` to ensure it's evaluated at runtime, preventing potential compilation issues with `OpenApi.json_encoder()`.
- Updated the `pattern` definition in `OpenApiSpexTest.Schemas` to use a string literal instead of a regex literal for consistency and to avoid potential issues with regex compilation.

Fix: Adjust string pattern test assertion

Following the refactoring, a test in `OpenApiSpex.CastStringTest` failed due to a change in how regex patterns were handled. This fix corrects the assertion for string pattern matching to compare the `source` of the regex instead of the regex struct directly, resolving the test failure.
@zorbash zorbash merged commit 572130d into open-api-spex:master Jul 1, 2025
9 checks passed
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.

2 participants