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

agnaldo4j / kanban_vision_api_iex / 23b6b7b6dccf1fe12177e26bde169df35e8a5ea7
88%

Build:
DEFAULT BRANCH: main
Ran 11 Mar 2026 12:28AM UTC
Jobs 1
Files 56
Run time 1min
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

11 Mar 2026 12:25AM UTC coverage: 88.039% (+4.5%) from 83.582%
23b6b7b6dccf1fe12177e26bde169df35e8a5ea7

push

github

web-flow
feat: add web_api REST app with Plug + OpenAPI (#19)

* feat: add web_api REST app with Plug + OpenAPI

Introduces a new `web_api` umbrella app that exposes the existing
GenServer-based use cases as a REST API, following Ports & Adapters.

## What's included

**App structure (apps/web_api/)**
- Bandit HTTP server (~> 1.0) with Plug.Router
- OpenAPI 3.0 spec + Swagger UI via open_api_spex (~> 3.18)
- Mox (~> 1.0) for unit test isolation

**Routes**
- GET/POST /api/v1/organizations
- GET /api/v1/organizations/search?name=X
- GET/DELETE /api/v1/organizations/:id
- GET/POST /api/v1/simulations
- GET /api/v1/simulations/search?org_id=X&name=Y
- DELETE /api/v1/simulations/:id
- GET /api/openapi (JSON spec) + GET /api/swagger (Swagger UI)

**Architecture (Ports & Adapters)**
- `ports/`: OrganizationUsecase + SimulationUsecase behaviours
- `adapters/`: delegate to registered GenServers by module name
- `plugs/`: CorrelationId (X-Correlation-ID header) + RequestLogger (structured logs)
- Controllers are pure adapters — no business logic
- Serializers are pure functions with ISO8601 date formatting

**Testing**
- 42 unit tests (Plug.Test + Mox, async: false for Application.get_env injection)
- 15 integration tests (@tag :integration, excluded by default)
- config/test.exs disables Bandit during test (start_server: false)

**Quality gates (all passing)**
- mix format: clean
- mix credo: 0 issues
- mix dialyzer: 0 errors
- mix test: 149 tests, 0 failures
- mix test --only integration: 15 tests, 0 failures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: add missing coverage for router, adapters, spec and controllers

Fixes coverage from 60% to 87.6% (threshold: 80%).

Gap analysis and additions:
- router_test.exs: covers all 26 router route-dispatch lines (was 0%)
- spec_test.exs: covers open_api/spec.ex Spec.spec/0 (was 0%)
- organization_adapter_test.exs: covers all 5 adapter delegate lines (was 0%)
- simulation_adapter_test.exs: covers all 4... (continued)

169 of 175 new or added lines in 14 files covered. (96.57%)

449 of 510 relevant lines covered (88.04%)

4.57 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
0.0
apps/web_api/lib/kanban_vision_api/web_api/application.ex
Jobs
ID Job ID Ran Files Coverage
1 23b6b7b6dccf1fe12177e26bde169df35e8a5ea7.1 11 Mar 2026 12:28AM UTC 56
88.04
GitHub Action Run
Source Files on build 23b6b7b6dccf1fe12177e26bde169df35e8a5ea7
  • Tree
  • List 56
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 23b6b7b6 on github
  • Prev Build on main (#E781614C...)
  • Next Build on main (#7AD579E3...)
  • 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