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

kcl-lang / kcl-openapi
65%

Build:
DEFAULT BRANCH: main
Repo Added 04 Jul 2023 07:31AM UTC
Token bsczfAPhgbOT0k4RAgkHGpQ11pAGLDtoO regen
Build 259 Last
Files 21
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

LAST BUILD ON BRANCH main
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • add-map-to-kcl-value
  • amyXia1994-patch-1
  • bugfix-143-multiple-validations
  • bump/cla
  • chore-bump-regex-match-func
  • chore-deprecated-cli
  • chore-update-cla-version
  • chore/docker-release-config
  • chore/migrate-repo
  • chore/update-release-ci
  • ci-update-test-condition
  • cleanup_ioutil
  • dependabot/github_actions/actions/checkout-4
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/actions/checkout-6
  • dependabot/github_actions/actions/checkout-7
  • dependabot/github_actions/actions/setup-go-5
  • dependabot/github_actions/actions/setup-go-6
  • dependabot/github_actions/actions/setup-go-7
  • dependabot/github_actions/actions/setup-python-5
  • dependabot/github_actions/actions/setup-python-6
  • dependabot/github_actions/actions/setup-python-7
  • dependabot/github_actions/docker/login-action-3
  • dependabot/github_actions/goreleaser/goreleaser-action-6
  • dependabot/go_modules/github.com/go-openapi/errors-0.22.0
  • dependabot/go_modules/github.com/go-openapi/errors-0.22.1
  • dependabot/go_modules/github.com/go-openapi/errors-0.22.2
  • dependabot/go_modules/github.com/go-openapi/errors-0.22.3
  • dependabot/go_modules/github.com/go-openapi/inflect-0.21.0
  • dependabot/go_modules/github.com/go-openapi/inflect-0.21.2
  • dependabot/go_modules/github.com/go-openapi/inflect-0.21.3
  • dependabot/go_modules/github.com/go-openapi/inflect-1.0.0
  • dependabot/go_modules/github.com/go-openapi/loads-0.25.2
  • dependabot/go_modules/github.com/go-openapi/strfmt-0.23.0
  • dependabot/go_modules/github.com/go-openapi/strfmt-0.24.0
  • dependabot/go_modules/github.com/go-openapi/strfmt-0.27.0
  • dependabot/go_modules/github.com/jessevdk/go-flags-1.6.1
  • dependabot/go_modules/github.com/kr/pretty-0.3.1
  • dependabot/go_modules/github.com/stretchr/testify-1.10.0
  • dependabot/go_modules/github.com/stretchr/testify-1.11.0
  • dependabot/go_modules/github.com/stretchr/testify-1.11.1
  • dependabot/go_modules/github.com/stretchr/testify-1.12.1
  • dependabot/go_modules/github.com/stretchr/testify-1.9.0
  • doc/contributing
  • doc/install-approaches
  • doc/k8s-pkg-generate
  • enhance-int-or-string-array-pattern
  • enhance/support-v1-crd-versions
  • feat-item-all-pattern
  • feat-mangle-property-name-with-quote
  • feat-protocol-mixin-suffix
  • feat-use-raw-string-for-generated-schema
  • feat-yaml-stream-format-input
  • feat/18-reuse-existing-models
  • feat/22-cel-validations
  • feat/35-openapi3-support-v2
  • feat/53-package-root
  • feat/preprocess-script
  • fix
  • fix-additional-property-pattern
  • fix-all-of-pattern
  • fix-default-value-with-x-order-generation
  • fix-disable-auto-block-pr-option
  • fix-multiple-pattern-in-items-and-additional-properties
  • fix-nil-pointer-for-array-branch
  • fix-optional-attr-min-and-max-validation-gen
  • fix-schema-generation
  • fix-split-documents
  • fix-typo-in-documents
  • fix-yaml-stream-format-input
  • fix/147-comment-only-doc-skip
  • fix/151-list-pattern-regex
  • fix/179-crd-short-schema-names
  • fix/cel-kcl-valid-output
  • fix/conflict-import
  • fix/docker-username-pw
  • fix/empty-check-blocks
  • fix/govulncheck-2026-08
  • fix/import-path-under-pkgroot
  • fix/issue-165-kin-openapi-bump
  • fix/mixin_protocol_suffix
  • fix/multiline-default-string
  • fix/multiple-version-crdext-v1
  • fix/pre-process
  • fix/regex-check
  • fix/wrong-crd-apiversion
  • fix_link
  • main
  • mangle-system-module-import
  • minor/add-version
  • refs/tags/v0.5.0
  • refs/tags/v0.5.1
  • refs/tags/v0.5.2
  • refs/tags/v0.5.3
  • refs/tags/v0.5.4
  • refs/tags/v0.5.5
  • refs/tags/v0.6.0
  • refs/tags/v0.6.1
  • refs/tags/v0.6.2
  • refs/tags/v0.6.3
  • refs/tags/v0.6.4
  • refs/tags/v0.6.5
  • refs/tags/v0.6.6
  • refs/tags/v0.7.0
  • refs/tags/v0.8.0
  • refs/tags/v0.9.0
  • support-int-or-str
  • workflow/sync-k8s-models

21 Sep 2026 05:30AM UTC coverage: 64.723% (+0.4%) from 64.293%
35564743446

push

github

web-flow
feat(generator): short, organized schema names for CRD imports (#180)

Fixes #179. Importing a CRD used to produce schema names glued from the
full property path, e.g.
ArgoprojIoV1alpha1ClusterWorkflowTemplateSpecAffinityNodeAffinity...
PreferredDuringSchedulingIgnoredDuringExecutionItems0PreferenceMatchFieldsItems0.

The names came from the code generator naming anonymous inline objects
after their property path within the root definition. This change adds a
post-flatten pass (pkg/swagger/generator/names.go) that:

- renames each CRD root definition (group.version.Kind) after its Kind,
  appending the version when several versions share the Kind;
- hoists every inline complex object below the roots into its own named
  definition, named after the short root plus at most two trailing
  meaningful path segments, dropping noise segments such as array
  "items"/"0" (e.g. ClusterWorkflowTemplatePreferenceMatchFields); on
  collision the name extends towards the root (capped) and then takes a
  numeric suffix, all assigned deterministically from a shared registry;
- rewrites every local $ref accordingly. Hoisted definitions render as
  their own model file with plain same-package references.

CRD-derived definitions are recognized by an x-kcl-crd-root marker set
during CRD->swagger conversion, so bundled k8s types and plain OpenAPI
specs are untouched. --long-names restores the previous behavior.

Two related optional modes:

- --crd-dedupe-k8s (dedupe.go): CRD definitions that are structurally
  identical to a bundled k8s type (e.g. a PodSpec inlined by
  argo-workflows) become x-kcl-type aliases to the official k8s module
  instead of duplicated local schemas (166 aliases on the argo CRD from
  the issue). Structures are compared canonically: descriptions and
  ordering annotations ignored, $refs resolved recursively, required
  sorted, x-kubernetes-* extensions and constraints kept; when several
  k8s API versions collide, the shortest (stable) import p... (continued)

532 of 703 new or added lines in 8 files covered. (75.68%)

60 existing lines in 3 files now uncovered.

3141 of 4853 relevant lines covered (64.72%)

0.73 hits per line

Relevant lines Covered
Build:
Build:
4853 RELEVANT LINES 3141 COVERED LINES
0.73 HITS PER LINE
Source Files on main
  • Tree
  • List 21
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
35564743446 main feat(generator): short, organized schema names for CRD imports (#180) Fixes #179. Importing a CRD used to produce schema names glued from the full property path, e.g. ArgoprojIoV1alpha1ClusterWorkflowTemplateSpecAffinityNodeAffinity... PreferredD... push 21 Sep 2026 05:34AM UTC web-flow github
64.72
35564453053 fix/179-crd-short-schema-names feat(generator): short, organized schema names for CRD imports Fixes #179. Importing a CRD used to produce schema names glued from the full property path, e.g. ArgoprojIoV1alpha1ClusterWorkflowTemplateSpecAffinityNodeAffinity... PreferredDuringSc... Pull #180 21 Sep 2026 05:27AM UTC claude github
64.72
34169862597 dependabot/go_modules/github.com/go-openapi/inflect-1.0.0 Chore: (deps): bump github.com/go-openapi/inflect from 0.21.3 to 1.0.0 Bumps [github.com/go-openapi/inflect](https://github.com/go-openapi/inflect) from 0.21.3 to 1.0.0. - [Release notes](https://github.com/go-openapi/inflect/releases) - [Commits... Pull #174 07 Sep 2026 11:25PM UTC web-flow github
64.29
33465196655 main Chore: (deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 (#170) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.11.1 to 1.12.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commit... push 01 Sep 2026 03:12AM UTC web-flow github
64.29
33462367124 dependabot/go_modules/github.com/stretchr/testify-1.12.1 Chore: (deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.11.1 to 1.12.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](http... Pull #170 01 Sep 2026 02:26AM UTC web-flow github
64.29
33462022557 dependabot/go_modules/github.com/go-openapi/loads-0.25.2 Chore: (deps): bump github.com/go-openapi/loads from 0.21.1 to 0.25.2 Bumps [github.com/go-openapi/loads](https://github.com/go-openapi/loads) from 0.21.1 to 0.25.2. - [Release notes](https://github.com/go-openapi/loads/releases) - [Commits](http... Pull #169 01 Sep 2026 02:19AM UTC web-flow github
64.29
33461894309 main Chore: (deps): bump github.com/go-openapi/strfmt from 0.24.0 to 0.27.0 (#172) Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.24.0 to 0.27.0. - [Release notes](https://github.com/go-openapi/strfmt/releases) - [Co... push 01 Sep 2026 02:17AM UTC web-flow github
64.29
33450532614 dependabot/go_modules/github.com/go-openapi/strfmt-0.27.0 Chore: (deps): bump github.com/go-openapi/strfmt from 0.24.0 to 0.27.0 Bumps [github.com/go-openapi/strfmt](https://github.com/go-openapi/strfmt) from 0.24.0 to 0.27.0. - [Release notes](https://github.com/go-openapi/strfmt/releases) - [Commits](... Pull #172 31 Aug 2026 11:26PM UTC web-flow github
64.29
33450518497 dependabot/go_modules/github.com/go-openapi/loads-0.25.2 Chore: (deps): bump github.com/go-openapi/loads from 0.21.1 to 0.25.2 Bumps [github.com/go-openapi/loads](https://github.com/go-openapi/loads) from 0.21.1 to 0.25.2. - [Release notes](https://github.com/go-openapi/loads/releases) - [Commits](http... Pull #169 31 Aug 2026 11:26PM UTC web-flow github
64.29
33450523511 dependabot/go_modules/github.com/stretchr/testify-1.12.1 Chore: (deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.1 Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.11.1 to 1.12.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](http... Pull #170 31 Aug 2026 11:26PM UTC web-flow github
64.29
See All Builds (253)

Badge your Repo: kcl-openapi

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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