Commit 591fe02
fix: PUT on a writable entity 404s on two TS mounts and is undocumented in three ports
The cross-port REST contract (FR-008) makes the update verb reachable via BOTH
PATCH and PUT, routed to one handler. Every port's generated controller serves
both, and the Drizzle Fastify mount has registered both by default for some
time. Two `@metaobjectsdev/runtime-ts` mounts had not caught up:
- The Hono mount registered PATCH alone unless `updateMethod` said otherwise,
so a PUT the contract promises fell through to Hono's plain-text 404.
- The ObjectManager Fastify mount did the same.
Neither api-contract lane runs those mounts, which is how it survived; it is the
blind spot the Hono error-code defect sat in. Both now mount both verbs by
default, with `updateMethod` kept as the explicit single-verb restriction. Its
doc comment in all three flavors claimed a "patch" default that the Drizzle
mount had stopped honouring, and the agent-context reference taught the same
thing; both now say what the code does.
API docs moved with it. TypeScript (Fastify and Hono), Java and Kotlin
documented PATCH only for a writable entity while C# and Python documented
both, so an adopter or an agent reading `meta docs --agent` was told an
address the server answers did not exist. Each builder now emits a PUT row
beside PATCH. The Java and Kotlin accuracy tests, which check every documented
verb against the emitted Spring mapping, count it; the TS accuracy gate already
checked the verb against the full-CRUD mount.
Found while working the handoff's note that Java api-docs lacked PUT. That note
named one port; the gap was three ports' docs and two runtime mounts.
Tests: new Hono and ObjectManager-Fastify PUT tests went red first (Hono
answered its plain-text 404) and pass now. codegen-ts 1702, runtime-ts 473,
sdk 324, codegen-spring 307, codegen-kotlin 394, all green.
`scripts/ci-local.sh --quick` 36/36.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 0f9ba74 commit 591fe02
17 files changed
Lines changed: 225 additions & 24 deletions
File tree
- agent-context/skills/metaobjects-runtime-ui/references
- fixtures/agent-context-conformance
- ts-react-tanstack/expected/.claude/skills/metaobjects-runtime-ui/references
- ts-requirements/expected/.claude/skills/metaobjects-runtime-ui/references
- server
- java
- codegen-kotlin/src
- main/kotlin/com/metaobjects/generator/kotlin/apidocs
- test/kotlin/com/metaobjects/codegen/kotlin/apidocs
- codegen-spring/src
- main/java/com/metaobjects/generator/apidocs
- test/java/com/metaobjects/generator/apidocs
- typescript/packages
- codegen-ts
- src/generators
- test
- golden
- runtime-ts
- src
- drizzle-fastify
- fastify
- hono
- test
- fastify
- hono
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
226 | 249 | | |
227 | 250 | | |
228 | 251 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
| 256 | + | |
256 | 257 | | |
257 | 258 | | |
258 | 259 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| 638 | + | |
638 | 639 | | |
639 | 640 | | |
640 | 641 | | |
| |||
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| 844 | + | |
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
| |||
0 commit comments