Skip to content

Commit

Permalink
fix Share key format in OpenAPI schema to reflect implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbedard committed Oct 2, 2024
1 parent 9ac105e commit 6553057
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions apis/paios/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -884,13 +884,13 @@ components:
pattern: ^[a-z0-9]+:[a-f0-9]{1,128}$
shortUrlKey:
type: string
example: abc-def-ghi
pattern: ^[a-z]{3}-[a-z]{3}-[a-z]{3}$
example: abcd-efgh-ijkl
pattern: ^[a-z]{4}-[a-z]{4}-[a-z]{4}$
shortUrlKeyReadOnly:
type: string
readOnly: true
example: abc-def-ghi
pattern: ^[a-z]{3}-[a-z]{3}-[a-z]{3}$
example: abcd-efgh-ijkl
pattern: ^[a-z]{4}-[a-z]{4}-[a-z]{4}$
download:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Persona(SQLModelBase, table=True):
face_id: str | None = Field(default=None)

class Share(SQLModelBase, table=True):
id: str = Field(primary_key=True) # the short URL tag, eg abc-def-ghi
id: str = Field(primary_key=True) # the short URL tag, eg abcd-efgh-ijkl
resource_id: str = Field(foreign_key="resource.id") # the bot ID
user_id: str | None = Field(default=None) # the user granted access (optional)
expiration_dt: datetime | None = Field(default=None) # the link expiration date/time (optional)
Expand Down

0 comments on commit 6553057

Please sign in to comment.