Skip to content

Commit 8479c9a

Browse files
committed
fix(spec): the sharing.publicLink describe says the value is a slug and names where it is served
The describe called the value a "Generated public share URL". The author chooses it, nothing generates it, and the server reads it as a slug (publicFormSlug: /forms/x, forms/x and x are one slug). The describe now says so and names the REST form door and, on a console host, the console page /_console/f/:slug with the /forms/:slug redirect. Claude-Session: https://claude.ai/code/session_01RPo7FUd6bSnAfkWMAKi848 Co-authored-by: Claude <noreply@anthropic.com>
1 parent ef1fcb2 commit 8479c9a

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
The `sharing.publicLink` describe says the value is a slug and names where it is served
6+
7+
Clause-②: no
8+
9+
`FormView.sharing.publicLink` described itself as a "Generated public share URL". It is
10+
neither: the author chooses it, nothing generates it, and the server reads it as a slug, where
11+
`/forms/x`, `forms/x` and `x` name one slug, `x` (`publicFormSlug`). The describe now says so,
12+
and names where an anonymous visitor reaches the form while `enabled` and `allowAnonymous` are
13+
both true: the REST form door `GET /api/v1/forms/:slug` (on the default API base), and, on a
14+
host that serves the console, the console page `/_console/f/:slug`, with `/forms/:slug`
15+
redirected there and its query string carried. The generated `ui/sharing` and `ui/view`
16+
reference pages carry the new text. Describe text only: the accepted values, keys, types and
17+
exports do not change.

‎packages/spec/src/ui/sharing.zod.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@ export const SharingConfigSchema = lazySchema(() => strictObject({
9595
},
9696
}, {
9797
enabled: z.boolean().default(false).describe('Enable public sharing'),
98-
publicLink: z.string().optional().describe('Generated public share URL'),
98+
publicLink: z.string().optional().describe(
99+
'Public slug of the form, chosen by the author: not a URL, and never generated. '
100+
+ '`/forms/x`, `forms/x` and `x` name one slug, `x`. It is served to anonymous visitors only while '
101+
+ '`enabled` and `allowAnonymous` are both true: the REST form door answers `GET /api/v1/forms/:slug` '
102+
+ '(default API base), and a host that serves the console shows the form at `/_console/f/:slug` and '
103+
+ 'redirects `/forms/:slug` there, query string carried.',
104+
),
99105
password: z.string().optional().describe('Password required to access shared link'),
100106
allowedDomains: z.array(z.string()).optional()
101107
.describe('Restrict access to specific email domains (e.g. ["example.com"])'),

0 commit comments

Comments
 (0)