• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iotaledger / iota / 24972442756 / 1
67%
develop: 67%

Build:
DEFAULT BRANCH: develop
Ran 27 Apr 2026 02:31AM UTC
Files 1265
Run time 31s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Apr 2026 10:34AM UTC coverage: 65.589% (+0.02%) from 65.569%
24972442756.1

push

github

web-flow
feat: Move `schemars` impls from `iota-types` to `iota-json-rpc-types` (#10508)

[run-ci]

### Summary

This PR removes all `schemars` / `JsonSchema` dependencies from
`iota-types` (the core domain crate) and re-implements JSON schema
generation exclusively within `iota-json-rpc-types` (the RPC boundary
crate). The result is a cleaner separation of concerns: core types no
longer carry RPC-specific schema annotations, and the JSON-RPC layer
owns all serialisation and schema logic through a new `serde_utils`
module.

As a side-effect, the generated `openrpc.json` spec is substantially
simplified — many opaque wrapper schemas have been replaced by their
concrete primitive representations, and several schema types that were
never needed by external clients have been removed entirely.

---

### Motivation

`iota-types` previously derived `JsonSchema` directly on many core types
(addresses, digests, sequence numbers, signatures, etc.). This pulled
the `schemars` crate — a purely RPC-concern — into the core domain crate
as a hard dependency, causing unnecessary coupling. It also meant that
schema shape was dictated by the derive macro rather than by deliberate
API design choices.

---

### Changes

#### New: `crates/iota-json-rpc-types/src/serde_utils.rs`

A new module introduces purpose-built `serde_with` adapter types that
implement both serialisation/deserialisation **and** `JsonSchema` for
commonly shared primitives. These adapters are used with `#[serde_as]`
throughout the RPC types layer.

| Adapter | Schema produced | Notes |
|---|---|---|
| `serde_utils::IotaAddress` | `string` | Wraps native `IotaAddress` |
| `serde_utils::ObjectID` | `string` | Wraps native `ObjectID` |
| `serde_utils::SequenceNumberString` | `string` | `u64` serialised as a
decimal string |
| `serde_utils::SequenceNumberU64` | `integer (uint64)` | Used where a
raw integer is appropriate |
| `serde_utils::ProtocolVersion` | `string` | Wraps
`iota_protocol_config::ProtocolVersion` |... (continued)

176638 of 269310 relevant lines covered (65.59%)

432744.5 hits per line

Source Files on job nextest+simtest - 24972442756.1
  • Tree
  • List 1265
  • Changed 108
  • Source Changed 61
  • Coverage Changed 95
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24972442756
  • 3c9b74d8 on github
  • Prev Job for on develop (#24919387294.1)
  • Next Job for on develop (#25029037219.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc