Skip to content

Commit 9db8cfb

Browse files
dmealingclaude
andcommitted
chore(examples): regenerate the showcase without the payload tier (ADR-0056)
regen-showcase.ts named `payload` in the C# and Python suites. Both CLIs now reject it, so the script drops it. The regenerated output: - C#: `SubscriberBlurbPayload.payload.cs` (a sealed record) is replaced by `SubscriberBlurbPayload.g.cs`. That file is the entity tier's POCO, which is now the one C# type for the value object. - Python: `subscriber_blurb_payload.py` is gone. The value object's model was already emitted as `SubscriberBlurbPayload.py`. - TypeScript, SQL, Java and Kotlin are byte-identical. The JVM pair was generated against this branch's reactor, installed into an isolated local Maven repository rather than ~/.m2. site-payload.json does not change. Part of #387. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ghY6h6CaGzZcmpHJ7msWQ
1 parent 6555c1e commit 9db8cfb

5 files changed

Lines changed: 24 additions & 42 deletions

File tree

‎examples/showcase/.metaobjects/.gen-state/.hashes.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"generated/csharp/AppDbContext.g.cs": "314c6078030ba151687430b37e6b6ea936238bb5df02df238e4acce2f95a430d",
33
"generated/csharp/Subscriber.g.cs": "3ca160941378fbb8b6ad6acf080ff85573f463931e21b8756873a4476e5dd163",
4-
"generated/csharp/SubscriberBlurbPayload.payload.cs": "2a02b73a14b39d3bd39b924ef017498c6ea4320b8143e893099562868a825044",
4+
"generated/csharp/SubscriberBlurbPayload.g.cs": "6b1ce5b5a4018c647586d86125718c4764ae5d6eeb94e9545e8006a7ec2b2b6f",
55
"generated/csharp/SubscriberFilterAllowlist.g.cs": "7428d47f6ccb64bb315266ee0564fa3803736623a34ab491435c042848c5d472",
66
"generated/csharp/SubscriberNames.g.cs": "91f6eba78657b31fceef7021c6ca6bd799524dcb5120acbc8fcbe18786787174",
77
"generated/csharp/SubscriberRoutes.g.cs": "41058cfbeb017e6b145d0288721d40e1d27e54b9cd398d82a13dbd62b39c3fb8",
88
"generated/python/Subscriber.py": "9dd4c0acea47f99d1daf79930f9de2e400f30780ebce6c63f023be528a72b762",
99
"generated/python/SubscriberBlurbPayload.py": "a5ef8a08e63efbe0f73e39a21a368cff5150c68cc8beeea6e8aab0c755f8bbdd",
1010
"generated/python/__init__.py": "daa04cec586768866d0996c779f62073e6773fe63750ff668327991fac2fd0f5",
11-
"generated/python/subscriber_blurb_payload.py": "e0c87b4fa08e20879abe86e9e10b283ffc58b6978fefbd29a6b4e9c76bf23d27",
1211
"generated/python/subscriber_filter_allowlist.py": "b0414cc95ff3982c80a0e1a06839f090c0b423e41f5a94275df93426cea09df5",
1312
"generated/python/subscriber_names.py": "269637a02bf9b46f55658b58cb42f83196c03a877e1e2101337847fd406c1561",
1413
"generated/python/subscriber_router.py": "7cf221a042731a1f1c939fbd30db10414787bacbd59ff6dbe759669b045e6737",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// <auto-generated/>
2+
// Generated by MetaObjects entity-generator (owned value object). Do not edit by hand.
3+
#nullable enable
4+
using System;
5+
using System.Collections.Generic;
6+
using System.ComponentModel.DataAnnotations;
7+
using System.ComponentModel.DataAnnotations.Schema;
8+
using System.Text.Json.Serialization;
9+
10+
namespace Generated;
11+
12+
public class SubscriberBlurbPayload
13+
{
14+
public enum SubscriberBlurbPayloadStatus { active, paused, cancelled }
15+
[JsonPropertyName("name")]
16+
public string? Name { get; set; }
17+
[JsonPropertyName("status")]
18+
public SubscriberBlurbPayloadStatus Status { get; set; }
19+
}

‎examples/showcase/generated/csharp/SubscriberBlurbPayload.payload.cs‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎examples/showcase/generated/python/subscriber_blurb_payload.py‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎scripts/regen-showcase.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ const PORTS: Port[] = [
217217
* lists for the same reason (`server/python/tests/codegen/gen_suite.py`,
218218
* `server/csharp/MetaObjects.Cli.Tests/GenSuiteForTests.cs`).
219219
*/
220-
const PYTHON_SUITE = "entity,routes,filter-allowlist,names,payload,output-parser,output-prompt,extractor";
221-
const CSHARP_SUITE = "entity,names,db-context,routes,filter-allowlist,payload,output-parser,output-prompt,extractor";
220+
// ADR-0056 removed `payload` from both: a template's payload and response types are the value
221+
// objects' own models, which `entity` already emits.
222+
const PYTHON_SUITE = "entity,routes,filter-allowlist,names,output-parser,output-prompt,extractor";
223+
const CSHARP_SUITE = "entity,names,db-context,routes,filter-allowlist,output-parser,output-prompt,extractor";
222224

223225
function selectPorts(): Port[] {
224226
if (BUN_ONLY) {

0 commit comments

Comments
 (0)