Skip to content
CAI
Software that uses CAICheck a score

inaka/cowboy_swagger

69.7

Adequate · 2 October 2026

807

lines of production code

Erlang

with JavaScript

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Erlang library that generates OpenAPI 3.0 and Swagger 2.0 specifications for Cowboy-based HTTP servers. It provides handlers to serve API documentation and supports multiple server listeners with distinct specifications. The project includes example applications and a test suite to demonstrate integration and functionality.

Features

Add example application configuration files

The example application now includes a sys.config file defining the HTTP port (8080) and Cowboy Swagger settings (static files path and OpenAPI 3.0.0 metadata), along with a vm.args file specifying the node name and cookie for local development.

example/config · high confidence

New Cowboy-based example application with OpenAPI 3.0 documentation

The example project has been modernized to use Rebar3 as the build tool and is now built on Cowboy and Trails. It provides a basic OpenAPI 3.0.0 example that includes a simple HTTP server with handlers for echoing messages and retrieving server descriptions, along with an HTML landing page linking to the generated Swagger documentation at /api-docs.

example/src · high confidence

Behavioural changes

Modernized example project with rebar3 and OTP 28 support

The example application has been updated to use rebar3 as the build tool, replacing previous build methods. It now requires Erlang/OTP 28 or later and includes a new .gitignore file to exclude build artifacts and dependencies. The project configuration (rebar.config) defines dependencies on cowboy\_swagger, mixer, and cowboy, and sets up linting and dialyzer checks. A rebar.config.script ensures the local cowboy\_swagger source is used via a symlink in \_checkouts, and the README provides instructions for building and running the example server to view the Swagger API documentation.

example · high confidence

Refactor to support multiple servers and OpenAPI 3.0

The library has been refactored to support multiple Cowboy listeners (servers) running on the same node, allowing per-server Swagger specifications via new \server\_spec\ APIs in \cowboy\_swagger\. It also adds support for the OpenAPI 3.0.0 specification format alongside existing Swagger 2.0. The HTTP handling is split into dedicated handlers: \cowboy\_swagger\_handler\ manages routes, \cowboy\_swagger\_json\_handler\ serves the spec, and \cowboy\_swagger\_redirect\_handler\ redirects \/api-docs\ to the UI. The project build tool has been migrated from erlang.mk to rebar3, and the JSON library dependency has been switched from jiffy to jsx.

src · high confidence

Test coverage

Initial test suite and example applications for cowboy\_swagger

Added a comprehensive Common Test suite (cowboy\_swagger\_SUITE, cowboy\_swagger\_handler\_SUITE, cowboy\_swagger\_server\_spec\_SUITE) and supporting test utilities to verify the library's functionality. The tests cover JSON serialization, definition management, and server-specific schema generation for both Swagger 2.0 and OpenAPI 3.0.0 formats. Additionally, example applications (example and multiple\_hosts\_servers\_example) were introduced to demonstrate handler integration, multi-host routing, and the /api-docs endpoint behavior.

test · high confidence

Dependencies

Update Swagger UI to version 5.17.14

The embedded Swagger UI dependency has been updated to version 5.17.14. This change ensures that the API documentation interface served by the application reflects the latest features and fixes available in this specific release of the Swagger UI distribution.

(dependencies) · high confidence

Updated Swagger UI to version 5.17.14

The embedded Swagger UI static assets in the priv/swagger directory have been updated to version 5.17.14. This update includes the latest JavaScript bundles, CSS, and HTML templates for the API documentation interface, along with the corresponding Apache 2.0 license and copyright notices.

priv · high confidence

Upgrade to Erlang/OTP 28 and update core dependencies

The project now requires Erlang/OTP 28 or later, as indicated by the new \minimum\_otp\_vsn\ setting in \rebar.config\. This change is accompanied by updates to the core runtime dependencies, specifically upgrading \cowboy\ to 2.19.0, \ranch\ to 2.3.0, and \trails\ to 3.0.0. Additionally, the build toolchain has been modernized with the addition of \erlfmt\ for code formatting and \rebar3\_hank\ for linting, while the Swagger UI version has been updated to 5.17.14.

(repo-wide) · 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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 71 → 70 (-0.8)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (+0.1)
  • Architecture 69 → 69 (+0.0)
  • Maturity 62 → 62 (+0.0)
  • Readiness 78 → 71 (-6.7)
  • Security 96 → 99 (+3.0)

Resolved (6)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no installation or build instructions (README.md)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result

New (3)

  • Dependency not covered by the lockfile: cowboy_swagger
  • Medium CVE: EEF-[CVE redacted] (rebar.lock)
  • Unbounded dependency requirement: cowboy_swagger

Changes since last survey

  • 10 commits — 8 feature/other, 2 fixes

By area

  • src/cowboy_swagger.erl — 4 commits
  • example/src — 3 commits
  • (repo) — 2 commits
  • (root) — 1 commit

Notable commits

  • fix: Potential fix for pull request finding 'Use schemas or parameters as definition component keys'
  • fix: brujo.211.otp28- Use new docs - Fix #211
  • change: Merge pull request #212 from inaka/brujo.211.otp28
  • change: Merge pull request #213 from inaka/brujo.211.otp28
  • change: Potential fix for pull request finding 'Fix grammar before “single-valued”'
  • change: brujo.211.otp28- Move support to OTP28+
  • change: brujo.211.otp28- Remove jsx
  • change: brujo.211.otp28- Thanks, Copilot
  • change: brujo.211.otp28- Use new comprehensions
  • change: brujo.211.otp28- Use nominal types

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

inaka/cowboy_swagger 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 2841ca99c5e541414fc699f819c2cc31986deb17 — 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.