Skip to content

Conversation

habibrehmansg
Copy link

This pull request includes updates to ensure proper escaping of backslashes in regular expressions for bigint patterns. The changes affect both the test cases and the transformer logic.

Changes to regular expression escaping:

  • spec/types/bigint.spec.ts: Updated the test case for the SimpleBigInt schema to use a properly escaped regular expression (^\d+) for the pattern` property.
  • src/transformers/big-int.ts: Modified the BigIntTransformer class to use the escaped regular expression (^\d+) in the pattern` property when transforming a nullable type.

@habibrehmansg
Copy link
Author

Additionally, a bigint type with no default() appears as a random value in schema example value. I am unable to find out how this is generated. Ideally it should be "0".

"id": "9429915432135503096"

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