Skip to content

Commit a7b2b51

Browse files
bpamiriclaude
andauthored
docs: clarify which generators use the attribute syntax (#2510)
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. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8ff6fbc commit a7b2b51

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • web/sites/guides/src/content/docs/v4-0-0-snapshot/command-line-tools/wheels-commands

‎web/sites/guides/src/content/docs/v4-0-0-snapshot/command-line-tools/wheels-commands/code-generation.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ Running `wheels generate` with no arguments prints the list of supported types a
4747

4848
## Attribute syntax
4949

50-
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`.
50+
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`.
51+
52+
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.
5153

5254
| You write | Column type | Notes |
5355
|---|---|---|

0 commit comments

Comments
 (0)