Skip to content

Add validation to ResourceId and ObjectId - #7

Merged
stevensJourney merged 4 commits into
journeyapps:mainfrom
LucDeCaf:fix/object-id-validation
Apr 28, 2026
Merged

stevensJourney merged 4 commits into
journeyapps:mainfrom
LucDeCaf:fix/object-id-validation

Conversation

@LucDeCaf

@LucDeCaf LucDeCaf commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Adds bsonObjectId keyword which validates that the ObjectId codec and the ResourceId.id field are valid BSON ObjectIds.

Note that this is possible with less code via pattern: '^[0-9a-fA-F]{24}$' in the ObjectId codec; however this approach benefits from being able to call ObjectId.isValid directly.

@changeset-bot

changeset-bot Bot commented Apr 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1f4965d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@journeyapps-labs/micro-codecs Patch
@journeyapps-labs/micro-schema Patch
@journeyapps-labs/micro-streaming Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stevensJourney
stevensJourney merged commit 5eec7be into journeyapps:main Apr 28, 2026
2 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.

3 participants