From dffd11354fc3b061a17c0612400c0bc178c3e542 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 18 Jul 2026 07:25:43 +0000 Subject: [PATCH] fix(vscode): drop invalid `ownership: 'own'` from the object snippet; document the field (#3175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_014343Qv6DFAykuAJc9yjANb --- content/docs/data-modeling/objects.mdx | 1 + packages/vscode-objectstack/snippets/objectstack.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/data-modeling/objects.mdx b/content/docs/data-modeling/objects.mdx index a4fe98b9b2..cfef157c69 100644 --- a/content/docs/data-modeling/objects.mdx +++ b/content/docs/data-modeling/objects.mdx @@ -262,6 +262,7 @@ indexes: [ | `abstract` | `boolean` | Abstract base, cannot be instantiated (default: `false`) | | `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) | | `keyPrefix` | `string` | Short prefix for record IDs (e.g. `'001'`) | +| `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. | | `validations` | `ValidationRule[]` | Object-level validation rules (see [Validation](/docs/data-modeling/validation)) | ## Naming Conventions diff --git a/packages/vscode-objectstack/snippets/objectstack.json b/packages/vscode-objectstack/snippets/objectstack.json index 0aa4f2051f..1fa53ae197 100644 --- a/packages/vscode-objectstack/snippets/objectstack.json +++ b/packages/vscode-objectstack/snippets/objectstack.json @@ -9,7 +9,6 @@ " name: '${2:my_object}',", " label: '${3:My Object}',", " pluralLabel: '${3:My Object}s',", - " ownership: 'own',", " fields: {", " name: {", " type: 'text',",