emqx/minirest
70.9
Strong · 2 October 2026
1.9k
lines of production code
Erlang
primary language
2
measurements over time
What this system is
Minirest is a lightweight RESTful API framework for Erlang built on Cowboy and Swagger. It provides core capabilities for defining API specifications, handling HTTP routing, and managing request bodies including JSON, files, and form data. The system supports features such as authentication, structured logging, and automatic OpenAPI schema generation to facilitate the development of robust web services.
Features
Initial release of minirest with rebar3 build support
This change introduces the minirest framework, a mini RESTful API built on Cowboy and Swagger. It adds rebar3 build support via a new Makefile and rebar.config, establishing dependencies on Cowboy 2.9.0 and cowboy\_swagger 3.0.0. The release includes documentation in README.md detailing usage, such as defining API specs, setting response cookies, and adding log metadata, along with a .gitignore file to manage build artifacts and editor-specific files.
(repo-wide) · high confidence
Initial release of the minirest RESTful API framework
This change introduces the minirest application, a RESTful API framework built on Cowboy and cowboy\_swagger. It provides core capabilities including HTTP/HTTPS listener management, dynamic dispatch generation, Swagger/OpenAPI schema integration, and request handling with JSON and multipart form-body parsing. The framework supports authorization callbacks, request filtering, structured logging, and concurrent API spec generation.
src · high confidence
Introduce core type definitions and HTTP status constants
This change adds the \minirest.hrl\ and \minirest\_http.hrl\ header files, establishing the foundational type system and constants for the library. \minirest.hrl\ defines the core data structures for API specifications, handlers, and responses, including support for file uploads, form data, and structured logging metadata. \minirest\_http.hrl\ provides a comprehensive set of constants for standard HTTP status codes (1xx through 5xx) and a default response header map, enabling consistent status handling across the application.
include · high confidence
Introduce minirest body encoders for JSON, files, and form data
Added a new set of body encoder modules in src/body\_encoder to handle serialization of HTTP response bodies. The minirest\_json\_encoder validates and encodes JSON terms using jsx, while minirest\_message\_encoder provides a best-effort conversion of complex Erlang terms (including atoms, pids, and nested maps) into JSON strings. File responses are handled by minirest\_file\_encoder, which supports sending files via sendfile or binary content with correct content-type headers, and minirest\_form\_data\_encoder manages multipart form data encoding for both file uploads and key-value pairs. These components ensure that API responses are correctly formatted and that invalid input data results in appropriate error responses rather than crashes.
_src/body\encoder · high confidence
New example OpenAPI application for Minirest
Adds the \example\_openapi\ OTP application, an example implementation demonstrating the Minirest framework (v1.2.12). It provides a set of API modules including a basic hello endpoint, a pet management API with CRUD operations, file upload/download handlers, and a crash test endpoint. The application includes an OTP application and supervisor, configures HTTP routing on port 8088 under the \/minirest/example/openapi\ base path, and implements basic HTTP Basic authentication for the \authorization\ header.
_examples/example\openapi · high confidence
Test coverage
Added test coverage for handler, utility, and info API modules
Added new Common Test suites to verify core framework behaviors: \minirest\_handler\_SUITE\ tests lazy and binary body handling, flexible error responses, query-string parameter collection, authentication metadata passing between filters and handlers, route template path exposure to authorization callbacks, large body posting, and response cookie setting; \minirest\_util\_SUITE\ verifies that the parallel map utility correctly handles exceptions without hanging; and \minirest\_info\_api\_SUITE\ confirms that custom error codes are registered and exposed via the info API.
test · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 63 → 71 (+8.2)
- Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 99 → 99 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 43 → 52 (+9.0)
- Readiness 64 → 78 (+13.7)
- Security 92 → 95 (+2.7)
Resolved (4)
- Coverage not measured — no coverage collector is wired up
- Documentation: no architecture or design documentation (README.md)
- Documentation: no usage examples (README.md)
- Hotspot: src/minirest_handler.erl (src/minirest_handler.erl)
New (3)
- Dependency hygiene PARTLY measured — rebar3 pinning read, dependency currency not (no rebar.lock-pinned Hex declaration to grade)
- No dependency lockfile committed (examples/example_openapi/rebar.config)
- No dependency lockfile committed (rebar.config)
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- (repo) — 1 commit
Notable commits
- change: Merge pull request #140 from zmstone/260917-auth-failure-log-meta
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
emqx/minirest was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 87088e25f0a9e8cef1c23f5a9b5767180f775528 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.