Skip to content

Commit

Permalink
enforce maximum length on workspace_id
Browse files Browse the repository at this point in the history
This helps applications to not make assumptions that are false. 64 characters is a common limit that is not too restrictive for users/use-cases. In most cases special characters are not allowed at the start of identifiers.

By having these constraints it is easier to map workspace_id's to other resources that might impose similar constraints.
  • Loading branch information
Peter Van Bouwel committed Dec 18, 2024
1 parent 162952e commit e6730a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/workspaces/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ components:
schemas:
workspace_id:
type: string
pattern: '^[\w\-\.~]+$'
pattern: '^[A-Za-z0-9][\w\-\.~]{0,62}$'
example: my-workspace
workspace_title:
type: string
Expand Down

0 comments on commit e6730a1

Please sign in to comment.