Skip to content

Conversation

@tillrohrmann
Copy link
Contributor

@tillrohrmann tillrohrmann commented Jan 3, 2026

This PR is based on #4125.

This fixes #3766.

@tillrohrmann tillrohrmann force-pushed the bump-schemars branch 3 times, most recently from 2e8ee1d to 3b7a754 Compare January 3, 2026 14:24
@tillrohrmann tillrohrmann force-pushed the bump-schemars branch 2 times, most recently from 623ee11 to 593ed26 Compare January 9, 2026 10:02
Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Small comment, and then LGTM

fn json_schema(_generator: &mut schemars::SchemaGenerator) -> schemars::Schema {
schemars::json_schema!({
"type": "string",
"format": "ip:port",
Copy link
Contributor

Choose a reason for hiding this comment

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

A note about formats (here and in other places).

format is a json schema keyword which accepts either "well defined formats" or "custom formats". Problem is, some codegens won't like custom formats, and might behave erratically with those.

So please remove all the usages of "custom formats", and just keep the "formats" when they're part of this well-defined list: https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-00#rfc.section.7.3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the pointer. Ok, then I'll remove the custom formats.

While custom formats are supported by JSON schema, it makes some code generator
tools to trip over them. Hence, we are removing custom formats from the code
base.
@tillrohrmann tillrohrmann merged commit 7c4f487 into restatedev:main Jan 9, 2026
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2026
@tillrohrmann tillrohrmann deleted the bump-schemars branch January 9, 2026 13:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

schemars 1.0 migration

2 participants