feat(custom-domain): document the organization custom domain listing
🎯 Why
q-core serves GET /organization/{organizationId}/customDomain in production (QOV-2543), but openapi.yaml does not describe it. As a result, none of the generated clients (Go, TypeScript, Rust) expose it, and the console, CLI and Terraform provider cannot call it.
🛠️ What
Documents the endpoint as q-core serves it today. It is restricted to organization admins. The optional projectId, environmentId and search filters narrow the list, and page / pageSize paginate it. Each result is one domain name of one environment, with every route that serves it. The generated client method is listOrganizationCustomDomain in a new OrganizationCustomDomainApi.
🟢 Risk: low (additive: one new path, 7 new schemas and 1 new enum; existing shapes are unchanged) · 💥 Breaking: no · ↩️ Rollback: plain revert
🗺️ Review guide · check the spec matches what q-core returns
openapi.yaml: check the path'/organization/{organizationId}/customDomain'against q-core'sOrganizationCustomDomainController.pageandpageSizeareinteger(q-core returns 400 on non-integers),pageSizeis limited to 1..100 with a default of 20, and the only possible 403 is for a caller who is not an organization admin.- Same file,
OrganizationCustomDomainPaginatedResponseListandOrganizationCustomDomainResponse: check them against q-core'sOrganizationCustomDomainDto.kt. Every property is required.portandpath_rewriteare nullable, and q-core writes them asnullrather than omitting them. Results have noid:environment_idanddomaintogether identify one. - Same file,
EnvironmentRoutingModeEnum: a new enum, so no existing consumer decodes it.CustomDomainServiceResponse.typereusesServiceTypeEnum, and onlyAPPLICATION,CONTAINERandHELMoccur.
🧠 Approach · document as built, with clean generated type names
portusesallOf+nullablewithout a siblingdescription. With a description, the Go generator creates a one-offCustomDomainRouteResponsePorttype; without it, the field isNullableCustomDomainPortResponse. The null rule moved into the route's description.- Schema names match the q-core DTOs. None of them existed in the spec before.
- Not in this PR:
statusCount, thestatus[]filter and theroutingStatusfields (QOV-2547, not shipped). The console, CLI and Terraform provider can adoptlistOrganizationCustomDomainonce the clients are published.
✅ Verified:
- Spectral with its built-in OAS rules reports no new findings against
main.npm testcould not run because its Stoplight ruleset URL returns 404. - I generated the TypeScript (7.8.0), Go (7.6.0) and Rust (7.20.0) clients locally, and all three build.
- "Generate API Clients" is green. Its Rust build step fails, but the step does not stop the job on errors, and
mainfails the same way:uuid@1.29.3requires rustc 1.89 and CI has 1.88. This change does not cause it.
🧪 How to test
- Take an organization with custom domains, an API token of an organization admin, and an API token of a non-admin member.
- With the admin token, run
curl -H "Authorization: Token $QOVERY_TOKEN" "https://api.qovery.com/organization/<org-id>/customDomain?pageSize=5". - Check the response against the schema in the API doc preview: an envelope with
results,page,page_sizeandtotal_count, and each route withservice,port(ornull),pathandpath_rewrite. - Repeat with the non-admin token and confirm a 403.