You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: rewrite AGENTS.md with corrected paths, consolidated customization guide, and maintenance workflow
Fixes incorrect test name (TestServices -> TestService), adds full file
paths to the customization reference table, documents both customization
map key formats, removes duplicated sections, and includes a Dependabot
update workflow with verified commands.
Assisted-by: Crush:glm-5.2
Customizations are service-specific modifications applied to the generated specs (add/remove flags, rename commands, etc.). They live in `cmd/carapace-spec-botocore/cmd/customizations/` and are registered in a shared `customizations` map via `init()` functions.
116
+
117
+
### Customization Map Keys
118
+
119
+
The map supports two key formats:
120
+
121
+
- **`"servicename"`** - applies to all operations within a service (e.g. `"s3"`, `"ec2"`)
122
+
- **`"servicename.operation-name"`** - applies to a specific operation (e.g. `"ec2.run-instances"`, `"iam.create-virtual-mfa-device"`)
1. **CamelCase → kebab-case**: The generator has a `CamelCaseToDash()` function with extensive hardcoded fixes for edge cases (e.g., `ec2-instance-id`, `whats-app` → `whatsapp`).
164
+
1. **CamelCase -> kebab-case**: The generator has a `CamelCaseToDash()` function with extensive hardcoded fixes for edge cases (e.g. `ec2-instance-id`, `whats-app` -> `whatsapp`).
119
165
120
166
2. **S3 is special**: S3 commands are named `s3api` not `s3`. The `s3.go` customization renames the spec.
121
167
@@ -127,10 +173,73 @@ Flag conventions:
127
173
128
174
6. **pflag replacement**: The `replace github.com/spf13/pflag => github.com/carapace-sh/carapace-pflag v1.1.0` directive in `go.mod` ensures carapace's patched pflag is used.
129
175
130
-
7. **Gorealeaser hooks**: Runs `go generate` before build (`before.hooks`).
176
+
7. **Goreleaser hooks**: Runs `go generate` before build (`before.hooks`).
Fix in `cmd/carapace-spec-botocore/cmd/argumentRenames.go`
222
+
223
+
#### B. Service has renamed commands
224
+
Add to `cmd/carapace-spec-botocore/cmd/customizations/removals.go` to skip, or update the relevant `<service>.go` customization file.
225
+
226
+
#### C. New flags on existing command
227
+
Update `cmd/carapace-spec-botocore/cmd/customizations/<service>.go` (see the [Example: Adding a Missing Flag](#example-adding-a-missing-flag) section above).
228
+
229
+
#### D. CamelCase -> kebab-case edge cases
230
+
Update `CamelCaseToDash()` in `cmd/carapace-spec-botocore/cmd/root.go`
0 commit comments