Skip to content

openapi.json release asset documents only apps.cozystack.io; core and sdn groups are missing #4858

Description

The OpenAPI document attached to every release covers only the apps API group. The other two groups that cozystack-api serves, core.cozystack.io and sdn.cozystack.io, are missing from it, so the published API reference has no TenantNamespace, TenantSecret, TenantModule or SecurityGroup.

The generator only knows about apps. tools/openapi-gen/main.go starts an in-process API server with stub storage, installs the apps group and reads back /openapi/v3/apis/apps.cozystack.io/v1alpha1. The real server in pkg/apiserver/apiserver.go serves more:

  • core.cozystack.io/v1alpha1: tenantnamespaces, tenantsecrets, tenantmodules, options, taps
  • sdn.cozystack.io/v1alpha1: securitygroups

The website is where it shows. Its hack/download_openapi.sh downloads openapi.json for each docs version and renders it with Swagger UI as the REST API Reference page. Non-Go clients that generate code from the asset miss these kinds too. I found nothing outside this repo in the cozystack org that uses the core or sdn types directly.

I'd install the core and sdn groups in the generator the same way, with stub storage, and emit their v3 documents as well. One merged file keeps the website script as is. One file per group is cleaner, but then the script has to learn about the extra files. Options and Taps are read-only resources computed for the dashboard, so whether they belong in the public reference is a separate call.

Checked on main at faf8a25.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/apiIssues or PRs related to the cozystack-api aggregated API server
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiIssues or PRs related to the cozystack-api aggregated API serverkind/bugCategorizes issue or PR as related to a bugtriage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions