Skip to content
CAI
Software that uses CAICheck a score

inaka/cowboy_swagger

66.4

Adequate · 15 November 2026

1.2k

lines of production code

Erlang

with JavaScript

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 66 (+0.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 75 → 71 (-4.4)
  • Architecture 69 → 69 (+0.0)
  • Maturity 58 → 60 (+1.9)
  • Readiness 71 → 71 (-0.1)
  • Security 99 → 100 (+0.2)

Resolved (1)

  • Medium CVE: EEF-[CVE redacted] (rebar.lock)

New (3)

  • Medium CVE: EEF-[CVE redacted] (rebar.lock)
  • Medium CVE: EEF-[CVE redacted] (rebar.lock)
  • Outdated: ranch

Changes since last survey

  • 20 commits — 18 feature/other, 2 fixes

By area

  • (root) — 11 commits
  • (repo) — 5 commits
  • example/export_swagger.escript — 2 commits
  • example/src — 1 commit
  • src/cowboy_swagger_initializer_handler.erl — 1 commit

Notable commits

  • fix: Fix configurable Swagger UI paths and add integration tests
  • fix: Validate provided operations instead of a fixed HTTP method list
  • change: Add configurable robots meta tag to Swagger UI
  • change: Add optional JSON exporter and build-time specification generation
  • change: Add optional validation of path bindings against documented parameters
  • change: Add validate_paths API for explicit validation before listener startup
  • change: Clarify README configuration examples and match existing formatting
  • change: Document the Swagger UI initializer handler
  • change: Improve the Erlang example and demonstrate Bearer authorization
  • change: Let JSON exporters raise failures and preserve their stacktraces
  • change: Load application configuration with application:set_env/2
  • change: Merge pull request #207 from vkatsuba/issues-206
  • change: Merge pull request #214 from vkatsuba/issue-203
  • change: Merge pull request #215 from vkatsuba/issue-169
  • change: Merge pull request #216 from vkatsuba/issue-98
  • change: Merge pull request #217 from vkatsuba/issue-156
  • change: Rename the exporter configuration setting to json_exporter
  • change: Simplify build code path discovery without list comprehensions
  • change: Use binary keys and values in the global_spec README example
  • change: Use the actual escript name in the usage message

Written by cca.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 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 7cb70a3f92d5ff9023e3502a26fa313158d55673 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.