From eddf576c597be53d39b1fa8db9e95b6c2ed17551 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 8 May 2026 21:38:09 +0000 Subject: [PATCH] docs: clarify which generators use the attribute syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Code Generation guide had an "Attribute syntax" section that read "Most generators accept a trailing list of name:type pairs" without naming which ones. Readers reasonably parsed the table that followed as global-to-all-generators (because it precedes every per-subcommand Synopsis), then got confused when the table didn't apply to e.g. generate controller or generate test (issue #2466). Make the boundary explicit: - List the four property-aware generators (model, scaffold, api-resource, property) in the lead paragraph. - Call out that the other generators take positional args documented per-subcommand below. No structural change — every per-subcommand Synopsis already documented the right arguments. The lead paragraph just makes the grouping unambiguous. Resolves #2466. --- .../command-line-tools/wheels-commands/code-generation.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/sites/guides/src/content/docs/v4-0-0-snapshot/command-line-tools/wheels-commands/code-generation.mdx b/web/sites/guides/src/content/docs/v4-0-0-snapshot/command-line-tools/wheels-commands/code-generation.mdx index 89bae4618..f8515de85 100644 --- a/web/sites/guides/src/content/docs/v4-0-0-snapshot/command-line-tools/wheels-commands/code-generation.mdx +++ b/web/sites/guides/src/content/docs/v4-0-0-snapshot/command-line-tools/wheels-commands/code-generation.mdx @@ -47,7 +47,9 @@ Running `wheels generate` with no arguments prints the list of supported types a ## Attribute syntax -Most generators accept a trailing list of `name:type` property pairs after the resource name. The parser also recognises a few `--belongsTo=`, `--hasMany=`, and `--hasOne=` flags for associations. Type names are normalised to Wheels migration column types — unknown types fall back to `string`. +Property-aware generators — `model`, `scaffold`, `api-resource`, and `property` — accept a trailing list of `name:type` property pairs after the resource name. They also recognise `--belongsTo=`, `--hasMany=`, and `--hasOne=` flags for associations. Type names are normalised to Wheels migration column types — unknown types fall back to `string`. + +The other generators (`controller`, `view`, `migration`, `route`, `test`, `helper`, `snippets`, `admin`) take their own positional arguments — see the per-subcommand Synopsis sections below for what each accepts. | You write | Column type | Notes | |---|---|---|