Skip to content

Commit 1c7ab8b

Browse files
os-zhuangclaude
andauthored
fix(vscode): drop invalid ownership: 'own' from the object snippet; document the field (#3175) (#3193)
Follow-up to #3185. The VS Code `os-object` snippet still scaffolded `ownership: 'own'` — the same now-invalid value removed from the CLI `generate` scaffold. Since #3185 made `ownership` a typed `'user' | 'org' | 'none'` enum, expanding the snippet produced an object that fails typecheck / `ObjectSchema.create()`. - vscode: remove the `ownership: 'own'` line from the object snippet (owner injection is the default; nothing to declare). - docs: document the now first-class `ownership` record-ownership knob in the object Additional Properties table. Claude-Session: https://claude.ai/code/session_014343Qv6DFAykuAJc9yjANb Co-authored-by: Claude <noreply@anthropic.com>
1 parent 49b9adc commit 1c7ab8b

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

content/docs/data-modeling/objects.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ indexes: [
262262
| `abstract` | `boolean` | Abstract base, cannot be instantiated (default: `false`) |
263263
| `sharingModel` | `enum` | Org-Wide Default record visibility (ADR-0055/0056/0090). Canonical four only: `'private'`, `'public_read'`, `'public_read_write'`, `'controlled_by_parent'` (detail visibility derived from its master). The legacy aliases (`'read'`, `'read_write'`, `'full'`) were removed from the enum (ADR-0090 D4) — authoring rejects them. Unset on a custom object resolves to `'private'` (ADR-0090 D1) |
264264
| `keyPrefix` | `string` | Short prefix for record IDs (e.g. `'001'`) |
265+
| `ownership` | `enum` | Record-ownership model: `'user'` (default — injects the reassignable `owner_id` lookup, engaging owner-scoped RLS, "My" views and owner reports), `'org'`, or `'none'` (no per-record owner — Dataverse-style catalog / junction tables, skips `owner_id`). Distinct from the package `own`/`extend` contribution kind. |
265266
| `validations` | `ValidationRule[]` | Object-level validation rules (see [Validation](/docs/data-modeling/validation)) |
266267

267268
## Naming Conventions

packages/vscode-objectstack/snippets/objectstack.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
" name: '${2:my_object}',",
1010
" label: '${3:My Object}',",
1111
" pluralLabel: '${3:My Object}s',",
12-
" ownership: 'own',",
1312
" fields: {",
1413
" name: {",
1514
" type: 'text',",

0 commit comments

Comments
 (0)