Skip to content

templates: forbid '/' in customer names + add by-name lookup#45

Draft
meAmitPatil wants to merge 1 commit into
mainfrom
amit/template-name-endpoint
Draft

templates: forbid '/' in customer names + add by-name lookup#45
meAmitPatil wants to merge 1 commit into
mainfrom
amit/template-name-endpoint

Conversation

@meAmitPatil
Copy link
Copy Markdown
Contributor

Summary

Two related changes that close the namespace squat hole and give SDKs a clean name lookup path.

1. Forbid / in customer template names. Today the regex allows it but we only blocked the superserve/ prefix specifically. A customer could still create system/foo, e2b/bar, etc. — names that look platform-curated. Now / is rejected for all non-system teams.

2. Add GET /templates/names/{name}. Dedicated lookup endpoint for resolving a template by name to a single object (200/404), mirroring GET /templates/{template_id} but keyed on name. Wildcard route handles the slash in system template names (superserve/python-3.11).

Notes

  • Customer-created templates: flat names only (no /). All existing customer templates are flat anyway, so no migration needed.
  • System templates: keep their superserve/... namespacing.
  • OpenAPI pattern on the create-template name field tightened to drop / (matches what customers can submit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant