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

kcl-lang / kcl-openapi / 33054453119
64%

Build:
DEFAULT BRANCH: main
Ran 27 Aug 2026 08:34AM UTC
Jobs 2
Files 16
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

27 Aug 2026 08:32AM UTC coverage: 67.544% (+0.7%) from 66.848%
33054453119

push

github

web-flow
feat: support OpenAPI 3.0/3.1 specs (closes #35) (#162)

Add detection + lowering pipeline for OpenAPI 3.x without ripping
out the existing go-openapi/loads path:

- detectOpenAPI3 peeks at the file header and reports whether the
  spec declares itself as 3.x. Detection accepts both YAML
  ("openapi: 3.x") and JSON ("openapi":"3.x"), and runs against
  both the raw header (catches JSON-form where the version is
  inside a quoted string) and a stripped version (avoids false
  positives from "# openapi: 3.x" comments in YAML).
- loadOpenAPI3 parses the 3.x doc with kin-openapi, lowers it to
  Swagger 2.0 via openapi2conv.FromV3, and writes the lowered
  doc to a temp JSON file that loads.Spec can pick up. We can't
  bypass loads.Spec because it's what sets specFilePath used
  later for $ref resolution.
- ensurePathsField re-injects "paths": {} after marshaling the
  lowered doc. Swagger 2.0 requires the paths field even when
  empty, but kin-openapi's openapi2.Swagger tags it omitempty.
- spec.go loadSpec() routes 3.x through loadOpenAPI3 and falls
  through to loads.Spec for 2.0 (unchanged behavior).

Tested via the existing TestGenerate_OAI2KCL runner (added an
openapi3_basic integration fixture) plus unit tests for the
detection helpers.

Signed-off-by: Claude <timi@noreply.anthropic.com>
Co-authored-by: Claude <timi@noreply.anthropic.com>

130 of 154 new or added lines in 2 files covered. (84.42%)

132 existing lines in 1 file now uncovered.

2591 of 3836 relevant lines covered (67.54%)

1.48 hits per line

Uncovered Changes

Lines Coverage ∆ File
23
84.14
pkg/swagger/generator/openapi3.go
1
84.39
0.11% pkg/swagger/generator/spec.go

Coverage Regressions

Lines Coverage ∆ File
132
0.0
-75.0% pkg/utils/integrate_gen.go
Jobs
ID Job ID Ran Files Coverage
1 33054453119.1 27 Aug 2026 08:34AM UTC 16
64.1
GitHub Action Run
2 33054453119.2 27 Aug 2026 08:34AM UTC 16
67.54
GitHub Action Run
Source Files on build 33054453119
  • Tree
  • List 16
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d95379a0 on github
  • Prev Build on main (#33054399940)
  • Next Build on main (#33133717168)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc