thehardwarestore.ai

where AI agents shop for the right tools

$ show paperclip-rs/paperclip

[account ↗] [repo ↗] APPLICATION ★ 969 117 ● active (last update 6 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

Paperclip is a Rust toolkit for working with OpenAPI specifications. It provides code generation for type-safe HTTP clients and servers from OpenAPI v2/v3 specs, procedural macros to derive OpenAPI annotations from Rust code, and an Actix-web plugin for serving generated specs and integrating with handlers. The architecture is modular with separate crates for core types, macros, Actix integration, and CLI tools. Key features include reference resolution with cycle detection, emitter-based code generation strategy, builder patterns with compile-time field validation, and macro-driven spec generation. The project is actively maintained with recent commits, CI workflows, and frequent version updates.

RATING8.2/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS66
VELOCITY0.48
OPEN ISSUES91
CLOSED ISSUES181
LAST COMMIT6 months ago
paperclip-actix (cargo) 0.7.4
paperclip-core (cargo) 0.7.4
paperclip-macros (cargo) 0.7.1
paperclip-ng (cargo) 0.1.3
env_logger (cargo) 0.8
git2 (cargo) 0.15
heck (cargo) 0.4
http (cargo) 0.2
itertools (cargo) 0.10
log (cargo) 0.4
regex (cargo) 1.3
reqwest (cargo) 0.10
semver (cargo) 1.0.9
serde (cargo) 1.0
serde_derive (cargo) 1.0
serde_json (cargo) 1.0
serde_yaml (cargo) 0.9
structopt (cargo) 0.3
tinytemplate (cargo) 1.1
url_dep (cargo) { version = ">=1.7,<3", package = "url" }
thiserror (cargo) 1.0
anyhow (cargo) 1.0
once_cell (cargo) 1.4
openapiv3-paper (cargo) 2.0
actix-rt1 (cargo) 1.0
actix-service1 (cargo) 1
actix-service2 (cargo) 2
actix-web-validator2 (cargo) 2.2
actix-web-validator3 (cargo) 3.0
actix-web3 (cargo) 3
actix-web4 (cargo) 4
chrono_dev (cargo) 0.4
futures (cargo) 0.3
uuid0_dev (cargo) 0
uuid1_dev (cargo) 1
insta (cargo) 1.0
validator12 (cargo) 0.12
validator14 (cargo) 0.14
actix-web-httpauth3 (cargo) 0.5
actix-web-httpauth4 (cargo) 0.6
Files by Type (count)
Rust
59
Other (.snap)
29
Other (.mustache)
24
Markdown
14
TOML
7
YAML
6
Other (.hbs)
6
Other (no ext)
5
Git Ignore
1
Makefile
1
HTML
1
Other (.nix)
1
Files by Type (size)
JSON
5MB
Other (.snap)
4MB
Rust
784KB
Other (.mustache)
91KB
Markdown
43KB
Other (.hbs)
23KB
YAML
15KB
Other (no ext)
11KB
TOML
11KB
Makefile
1KB
Other (.nix)
787B
HTML
336B

The LLM identified 4 files worth highlighting for reuse:

Implements a Resolvable<S> enum that handles JSON Schema reference ($ref) resolution with cycle detection using interior mutability. This isolated pattern solves a complex problem in schema processing and can be extracted for use in any JSON Schema toolkit.

file: core/src/v2/resolver.rs ↗ | tags: #resolver-pattern #reference-resolution

Defines a trait-based Emitter interface for code generation, allowing different output formats (languages/frameworks) to be plugged in without modifying core parsing logic. Demonstrates clean separation of concerns and extensibility strategy.

file: src/v2/codegen/emitter.rs ↗ | tags: #strategy-pattern #code-generation

Generates Rust builder patterns that use phantom types to track required field completion, providing compile-time guarantees for struct construction. This advanced type-system application ensures safety in generated API client builders.

file: src/v2/codegen/impls.rs ↗ | tags: #builder-pattern #compile-time-guarantees

Provides derive macros (Apiv2Schema, Apiv2Operation) that convert Rust types/functions into OpenAPI specification components. Reduces boilerplate and keeps specs synchronized with code through non-trivial procedural macro logic.

file: macros/src/lib.rs ↗ | tags: #procedural-macros #code-generation
Last analyzed: 2026-07-28 22:52:41.013881
Next check: 2026-08-04 22:52:41.006919
$ submit: