Skip to content

Commit b4be5bc

Browse files
docs: fix swagger tags for license endpoints (#21101)
## Summary Change `@Tags` from `Organizations` to `Enterprise` for `POST /licenses` and `POST /licenses/refresh-entitlements` to match the `GET` and `DELETE` license endpoints which are already tagged as `Enterprise`. ## Problem The license API endpoints were inconsistently tagged in the swagger annotations: - `GET /licenses` → `Enterprise` ✓ - `DELETE /licenses/{id}` → `Enterprise` ✓ - `POST /licenses` → `Organizations` ✗ - `POST /licenses/refresh-entitlements` → `Organizations` ✗ This caused the POST endpoints to be documented in the [Organizations API docs](https://coder.com/docs/reference/api/organizations) instead of the [Enterprise API docs](https://coder.com/docs/reference/api/enterprise) where the other license endpoints live. ## Fix Simply updated the `@Tags` annotation from `Organizations` to `Enterprise` for both POST endpoints. This was an oversight from the original swagger docs addition in #5625 (January 2023). Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
1 parent ceaba07 commit b4be5bc

File tree

5 files changed

+93
-93
lines changed

5 files changed

+93
-93
lines changed

coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/api/enterprise.md

Lines changed: 87 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/api/organizations.md

Lines changed: 0 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/coderd/licenses.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var Keys = map[string]ed25519.PublicKey{"2022-08-12": ed25519.PublicKey(key20220
5959
// @Security CoderSessionToken
6060
// @Accept json
6161
// @Produce json
62-
// @Tags Organizations
62+
// @Tags Enterprise
6363
// @Param request body codersdk.AddLicenseRequest true "Add license request"
6464
// @Success 201 {object} codersdk.License
6565
// @Router /licenses [post]
@@ -163,7 +163,7 @@ func (api *API) postLicense(rw http.ResponseWriter, r *http.Request) {
163163
// @ID update-license-entitlements
164164
// @Security CoderSessionToken
165165
// @Produce json
166-
// @Tags Organizations
166+
// @Tags Enterprise
167167
// @Success 201 {object} codersdk.Response
168168
// @Router /licenses/refresh-entitlements [post]
169169
func (api *API) postRefreshEntitlements(rw http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)