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.
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.gostarts 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 inpkg/apiserver/apiserver.goserves more:core.cozystack.io/v1alpha1: tenantnamespaces, tenantsecrets, tenantmodules, options, tapssdn.cozystack.io/v1alpha1: securitygroupsThe website is where it shows. Its
hack/download_openapi.shdownloadsopenapi.jsonfor 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.