Skip to content

chore: correct template API docs#19228

Merged
phorcys420 merged 10 commits into
mainfrom
phorcys420/fix-template-api-docs
Aug 19, 2025
Merged

chore: correct template API docs#19228
phorcys420 merged 10 commits into
mainfrom
phorcys420/fix-template-api-docs

Conversation

@phorcys420
Copy link
Copy Markdown
Member

@phorcys420 phorcys420 commented Aug 7, 2025

  • I used the codersdk.UpdateTemplateMeta type, because it seemed like the most appropriate type from codersdk/templates.go, I made that decision based on how patchOrganization in enterprise/coderd/organizations.go
    // @Param request body codersdk.UpdateOrganizationRequest true "Patch organization request"
    uses codersdk.UpdateOrganizationRequest
  • I made the body required in the docs even though it isn't actually enforced (i.e an empty body works on that endpoint), I don't know if we should enforce it
  • I have renamed "metadata" to "settings" so that it is more coherent with the wording in the UI, but that creates additionnal inconsistencies in logging and internal IDs that should probably be fixed at some point to make debugging easier.

@phorcys420 phorcys420 marked this pull request as draft August 7, 2025 12:18
@phorcys420 phorcys420 requested a review from deansheather August 7, 2025 14:34
@phorcys420
Copy link
Copy Markdown
Member Author

phorcys420 commented Aug 7, 2025

Comment thread coderd/templates.go Outdated
phorcys420 and others added 2 commits August 7, 2025 16:36
Co-authored-by: Dean Sheather <dean@deansheather.com>
Copy link
Copy Markdown
Member

@deansheather deansheather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a sound-ness perspective. I think Atif or Ben should sign off on the route name change, though

@phorcys420 phorcys420 requested review from bpmct and matifali August 7, 2025 14:42
@phorcys420
Copy link
Copy Markdown
Member Author

phorcys420 commented Aug 7, 2025

fyi Atif/Ben, I have renamed the "template metadata" wording to "template settings" in API docs as that is the wording we use in the UI, and one of my customers was confused about this, we just want your opinion on this.
image

@phorcys420 phorcys420 marked this pull request as ready for review August 7, 2025 14:43
Copy link
Copy Markdown
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from the UX perspective as we list them under Settings in the UI.

@phorcys420 phorcys420 enabled auto-merge (squash) August 8, 2025 17:42
@github-actions github-actions Bot added the stale This issue is like stale bread. label Aug 16, 2025
@github-actions github-actions Bot removed the stale This issue is like stale bread. label Aug 17, 2025
@phorcys420 phorcys420 merged commit b6abcba into main Aug 19, 2025
46 of 49 checks passed
@phorcys420 phorcys420 deleted the phorcys420/fix-template-api-docs branch August 19, 2025 15:14
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants