Skip to content

Conversation

@tejasbadadare
Copy link
Contributor

Summary

  • Add utoipa::ToSchema trait to api types
  • Bump protocol version in dependent crates

Rationale

  • Needed to generate the OpenAPI spec, used by the router docs endpoint in (PR here)

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code
    • Tested with the corresponding Lazer PR, linked above

@vercel
Copy link

vercel bot commented Oct 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Oct 31, 2025 0:02am
component-library Ready Ready Preview Comment Oct 31, 2025 0:02am
developer-hub Ready Ready Preview Comment Oct 31, 2025 0:02am
entropy-explorer Ready Ready Preview Comment Oct 31, 2025 0:02am
insights Ready Ready Preview Comment Oct 31, 2025 0:02am
proposals Ready Ready Preview Comment Oct 31, 2025 0:02am
staking Ready Ready Preview Comment Oct 31, 2025 0:02am

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Choose a reason for hiding this comment

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

P1 Badge Align schema type with string serialization

The new schema declares Price as #[schema(value_type = i64)], yet ParsedFeedPayload (and other API structs) serialize Price using crate::serde_str::option_price, which converts the value to a string. The OpenAPI specification generated from this derive will advertise an integer while the WebSocket/HTTP payloads actually contain quoted strings, so clients generated from the spec will attempt to parse numbers and fail at runtime. Consider modelling the schema as a string (or overriding the field-level schema) so it matches the serialized representation.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 Please update the schema to use crate::serde_str::option_price

Copy link
Contributor

@merolish merolish left a comment

Choose a reason for hiding this comment

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

Nice.

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