Skip to content

feat(config): 添加AI-First配置系统及源生成器#168

Merged
GeWuYou merged 3 commits into
mainfrom
feat/ai-first-config-system
Apr 3, 2026
Merged

feat(config): 添加AI-First配置系统及源生成器#168
GeWuYou merged 3 commits into
mainfrom
feat/ai-first-config-system

Conversation

@GeWuYou

@GeWuYou GeWuYou commented Apr 3, 2026

Copy link
Copy Markdown
Owner
  • 实现YAML配置文件加载和JSON Schema校验功能
  • 提供Source Generator自动生成配置类型和表包装类
  • 添加VS Code插件支持配置浏览和表单编辑
  • 支持跨表引用校验和开发期热重载功能
  • 生成强类型的配置访问辅助方法和注册绑定
  • 实现嵌套对象和对象数组的类型安全访问

Summary by Sourcery

从 JSON schema 文件生成强类型的配置注册与查找辅助工具,并更新文档和测试以反映新的绑定方式。

Enhancements:

  • 扩展 schema 模型和生成器,以生成配置绑定辅助类,这些类封装了表注册名称、相对路径以及键选择器。
  • 新增 schema 路径解析逻辑,用于推导在运行时使用的、稳定的 schema 相对路径。

Documentation:

  • 在游戏配置系统指南中记录新生成的注册与访问辅助工具,并说明推荐优先使用它们,而不是手动进行表注册。

Tests:

  • 扩展 schema 生成器的快照测试,增加模拟的配置加载器/注册表类型,以及针对新生成绑定辅助工具的快照。
Original summary in English

Summary by Sourcery

Generate strongly-typed config registration and lookup helpers from JSON schema files and update docs and tests to reflect the new bindings.

Enhancements:

  • Extend the schema model and generator to produce config binding helper classes that encapsulate table registration names, relative paths, and key selectors.
  • Add schema path resolution logic to derive stable schema-relative paths for use at runtime.

Documentation:

  • Document the new generated registration and access helpers in the game config system guide, including recommended usage over manual table registration.

Tests:

  • Expand schema generator snapshot tests with stubbed config loader/registry types and new snapshots for the generated bindings helpers.

- 实现YAML配置文件加载和JSON Schema校验功能
- 提供Source Generator自动生成配置类型和表包装类
- 添加VS Code插件支持配置浏览和表单编辑
- 支持跨表引用校验和开发期热重载功能
- 生成强类型的配置访问辅助方法和注册绑定
- 实现嵌套对象和对象数组的类型安全访问
@deepsource-io

deepsource-io Bot commented Apr 3, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in eaa1e5d...76479eb on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Apr 3, 2026 2:04a.m. Review ↗
Secrets Apr 3, 2026 2:04a.m. Review ↗

@sourcery-ai

sourcery-ai Bot commented Apr 3, 2026

Copy link
Copy Markdown

审阅者指南

扩展基于 schema 的配置源代码生成器,为每个 schema 生成强类型的运行时注册和访问辅助方法;丰富 schema 模型以携带命名和路径元数据;将新的生成输出接入测试和文档,并为生成的绑定添加快照覆盖。

生成的配置注册与访问辅助方法的时序图

sequenceDiagram
    actor Developer
    participant YamlConfigLoader
    participant MonsterConfigBindings
    participant ConfigRegistry
    participant IConfigRegistry
    participant MonsterTable

    Developer->>YamlConfigLoader: new YamlConfigLoader("config-root")
    Developer->>YamlConfigLoader: RegisterMonsterTable()
    activate YamlConfigLoader
    YamlConfigLoader->>MonsterConfigBindings: extension RegisterMonsterTable(loader, comparer)
    activate MonsterConfigBindings
    MonsterConfigBindings->>YamlConfigLoader: RegisterTable<int, MonsterConfig>(
    MonsterConfigBindings-->>YamlConfigLoader: returns loader
    deactivate MonsterConfigBindings
    YamlConfigLoader-->>Developer: loader
    deactivate YamlConfigLoader

    Developer->>YamlConfigLoader: LoadAsync(ConfigRegistry)
    YamlConfigLoader->>ConfigRegistry: register table using TableName,
    YamlConfigLoader-->>Developer: completed

    Developer->>ConfigRegistry: GetMonsterTable()
    activate ConfigRegistry
    ConfigRegistry->>MonsterConfigBindings: extension GetMonsterTable(registry)
    activate MonsterConfigBindings
    MonsterConfigBindings->>IConfigRegistry: GetTable<int, MonsterConfig>(TableName)
    activate IConfigRegistry
    IConfigRegistry-->>MonsterConfigBindings: IConfigTable<int, MonsterConfig>
    deactivate IConfigRegistry
    MonsterConfigBindings->>MonsterTable: new MonsterTable(innerTable)
    activate MonsterTable
    MonsterTable-->>MonsterConfigBindings: instance
    deactivate MonsterTable
    MonsterConfigBindings-->>ConfigRegistry: MonsterTable
    deactivate MonsterConfigBindings
    ConfigRegistry-->>Developer: MonsterTable
    deactivate ConfigRegistry

    Developer->>MonsterTable: Get(1)
    MonsterTable-->>Developer: MonsterConfig slime
Loading

Schema 模型与生成配置绑定的类图

classDiagram
    direction LR

    class SchemaFileSpec {
        +string FileName
        +string EntityName
        +string ClassName
        +string TableName
        +string Namespace
        +string KeyClrType
        +string KeyPropertyName
        +string TableRegistrationName
        +string ConfigRelativePath
        +string SchemaRelativePath
        +string Title
        +string Description
        +SchemaObjectSpec RootObject
    }

    class MonsterConfigBindings {
        <<static>>
        +const string TableName
        +const string ConfigRelativePath
        +const string SchemaRelativePath
        +YamlConfigLoader RegisterMonsterTable(loader, comparer)
        +MonsterTable GetMonsterTable(registry)
        +bool TryGetMonsterTable(registry, table)
    }

    class YamlConfigLoader {
        +YamlConfigLoader RegisterTable~TKey, TValue~(tableName, relativePath, schemaRelativePath, keySelector, comparer)
        +YamlConfigLoader EnableHotReload(watcher, onReloaded)
        +Task LoadAsync(registry)
    }

    class IConfigRegistry {
        <<interface>>
        +IConfigTable~TKey, TValue~ GetTable~TKey, TValue~(name)
        +bool TryGetTable~TKey, TValue~(name, table)
    }

    class IConfigTable~TKey, TValue~ {
        <<interface>>
        +int Count()
        +TValue Get(key)
        +bool ContainsKey(key)
        +IReadOnlyCollection~TValue~ All()
    }

    class MonsterTable {
        -IConfigTable~int, MonsterConfig~ inner
        +int Count()
        +MonsterConfig Get(id)
        +bool ContainsKey(id)
        +IReadOnlyCollection~MonsterConfig~ All()
    }

    class MonsterConfig {
        +int Id
        +string Name
        +int Hp
        +int Attack
    }

    class SchemaConfigGenerator {
        +Initialize(context)
        -SchemaParseResult ParseSchema(file)
        -string GenerateTableClass(schema)
        -string GenerateBindingsClass(schema)
        -string GetSchemaBaseName(path)
        -string GetSchemaRelativePath(path)
    }

    SchemaConfigGenerator --> SchemaFileSpec : uses
    SchemaConfigGenerator ..> MonsterConfigBindings : generates
    SchemaConfigGenerator ..> MonsterTable : generates
    SchemaConfigGenerator ..> MonsterConfig : generates

    MonsterConfigBindings ..> YamlConfigLoader : extension RegisterMonsterTable
    MonsterConfigBindings ..> IConfigRegistry : extension GetMonsterTable, TryGetMonsterTable
    MonsterConfigBindings ..> MonsterTable : constructs

    MonsterTable ..|> IConfigTable~int, MonsterConfig~ : implements
    IConfigRegistry ..> IConfigTable~TKey, TValue~ : returns

    MonsterConfig <-- MonsterTable : wraps values

    SchemaFileSpec o--> SchemaObjectSpec : RootObject
Loading

文件级改动

Change Details Files
为每个实体在 YamlConfigLoader 和 IConfigRegistry 之上生成用于注册和查找的配置绑定辅助方法。
  • 添加 GenerateBindingsClass,用于生成静态的 *ConfigBindings 帮助类,包含表名、配置相对路径和 schema 相对路径的常量。
  • 在 YamlConfigLoader 上生成扩展方法,以使用基于 schema 约定的方式注册强类型表,包括键选择器和比较器。
  • 在 IConfigRegistry 上生成扩展方法,以通过基于 schema 的表名获取和 TryGet 强类型表包装器。
GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs
丰富 schema 解析/模型,加入新绑定生成器所需的命名和路径元数据。
  • 计算 schema 基础名称,并在解析 schema 时与实体名称一同传入 SchemaFileSpec。
  • 扩展 SchemaFileSpec 记录,新增 EntityName、KeyPropertyName、TableRegistrationName、ConfigRelativePath 和 SchemaRelativePath 字段。
  • 添加 GetSchemaRelativePath 帮助方法以规范化 schema 文件路径,优先选择位于 schemas/ 目录下的路径片段,否则回退到默认路径。
GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs
更新测试以覆盖新生成的绑定,并为生成器使用的运行时抽象引入最小桩实现。
  • 扩展快照测试描述和示例运行时 API 桩,以包含 IConfigRegistry 和绑定中使用的 YamlConfigLoader.RegisterTable 重载。
  • 在现有配置和表快照之外,新增对 *ConfigBindings.g.cs 新输出的快照断言。
  • 新增 MonsterConfigBindings.g.txt 快照文件,包含期望的绑定输出。
GFramework.SourceGenerators.Tests/Config/SchemaConfigGeneratorSnapshotTests.cs
GFramework.SourceGenerators.Tests/Config/snapshots/SchemaConfigGenerator/MonsterConfigBindings.g.txt
将文档与新的生成注册/访问辅助方法及推荐用法保持一致。
  • 文档说明源代码生成器现在会生成配置类型、表包装器以及注册/访问辅助方法。
  • 更新运行时集成文档,展示如何使用生成的 RegisterXxxTable/GetXxxTable 辅助方法,而不是手动调用 RegisterTable,并解释这些辅助方法中内置的约定。
  • 澄清高级场景仍然可以使用原始的 YamlConfigLoader.RegisterTable API,并罗列所有生成器输出(配置类型、表包装器、loader/registry 辅助方法)。
docs/zh-CN/game/config-system.md

提示与命令

与 Sourcery 交互

  • 触发新的审阅: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 在某条审阅评论下回复,要求 Sourcery 从该评论创建 issue。你也可以在审阅评论下回复 @sourcery-ai issue 来从该评论创建 issue。
  • 生成 pull request 标题: 在 pull request 标题中任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title 以在任意时间(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文中任意位置写上 @sourcery-ai summary,即可在该处生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary 以在任意时间(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide,即可在任意时间(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不希望再看到它们,这会很有用。
  • 撤销所有 Sourcery 审阅: 在 pull request 中评论 @sourcery-ai dismiss,即可撤销所有现有的 Sourcery 审阅。特别适用于你想从一次新的审阅开始的场景——不要忘记再次评论 @sourcery-ai review 来触发新的审阅!

自定义你的体验

访问你的控制面板 以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、移除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English

Reviewer's Guide

Extends the schema-based config source generator to emit strongly typed runtime registration and access helpers for each schema, expands the schema model to carry naming and path metadata, wires new generator outputs into tests and documentation, and adds snapshot coverage for the generated bindings.

Sequence diagram for generated config registration and access helpers

sequenceDiagram
    actor Developer
    participant YamlConfigLoader
    participant MonsterConfigBindings
    participant ConfigRegistry
    participant IConfigRegistry
    participant MonsterTable

    Developer->>YamlConfigLoader: new YamlConfigLoader("config-root")
    Developer->>YamlConfigLoader: RegisterMonsterTable()
    activate YamlConfigLoader
    YamlConfigLoader->>MonsterConfigBindings: extension RegisterMonsterTable(loader, comparer)
    activate MonsterConfigBindings
    MonsterConfigBindings->>YamlConfigLoader: RegisterTable<int, MonsterConfig>(
    MonsterConfigBindings-->>YamlConfigLoader: returns loader
    deactivate MonsterConfigBindings
    YamlConfigLoader-->>Developer: loader
    deactivate YamlConfigLoader

    Developer->>YamlConfigLoader: LoadAsync(ConfigRegistry)
    YamlConfigLoader->>ConfigRegistry: register table using TableName,
    YamlConfigLoader-->>Developer: completed

    Developer->>ConfigRegistry: GetMonsterTable()
    activate ConfigRegistry
    ConfigRegistry->>MonsterConfigBindings: extension GetMonsterTable(registry)
    activate MonsterConfigBindings
    MonsterConfigBindings->>IConfigRegistry: GetTable<int, MonsterConfig>(TableName)
    activate IConfigRegistry
    IConfigRegistry-->>MonsterConfigBindings: IConfigTable<int, MonsterConfig>
    deactivate IConfigRegistry
    MonsterConfigBindings->>MonsterTable: new MonsterTable(innerTable)
    activate MonsterTable
    MonsterTable-->>MonsterConfigBindings: instance
    deactivate MonsterTable
    MonsterConfigBindings-->>ConfigRegistry: MonsterTable
    deactivate MonsterConfigBindings
    ConfigRegistry-->>Developer: MonsterTable
    deactivate ConfigRegistry

    Developer->>MonsterTable: Get(1)
    MonsterTable-->>Developer: MonsterConfig slime
Loading

Class diagram for schema model and generated config bindings

classDiagram
    direction LR

    class SchemaFileSpec {
        +string FileName
        +string EntityName
        +string ClassName
        +string TableName
        +string Namespace
        +string KeyClrType
        +string KeyPropertyName
        +string TableRegistrationName
        +string ConfigRelativePath
        +string SchemaRelativePath
        +string Title
        +string Description
        +SchemaObjectSpec RootObject
    }

    class MonsterConfigBindings {
        <<static>>
        +const string TableName
        +const string ConfigRelativePath
        +const string SchemaRelativePath
        +YamlConfigLoader RegisterMonsterTable(loader, comparer)
        +MonsterTable GetMonsterTable(registry)
        +bool TryGetMonsterTable(registry, table)
    }

    class YamlConfigLoader {
        +YamlConfigLoader RegisterTable~TKey, TValue~(tableName, relativePath, schemaRelativePath, keySelector, comparer)
        +YamlConfigLoader EnableHotReload(watcher, onReloaded)
        +Task LoadAsync(registry)
    }

    class IConfigRegistry {
        <<interface>>
        +IConfigTable~TKey, TValue~ GetTable~TKey, TValue~(name)
        +bool TryGetTable~TKey, TValue~(name, table)
    }

    class IConfigTable~TKey, TValue~ {
        <<interface>>
        +int Count()
        +TValue Get(key)
        +bool ContainsKey(key)
        +IReadOnlyCollection~TValue~ All()
    }

    class MonsterTable {
        -IConfigTable~int, MonsterConfig~ inner
        +int Count()
        +MonsterConfig Get(id)
        +bool ContainsKey(id)
        +IReadOnlyCollection~MonsterConfig~ All()
    }

    class MonsterConfig {
        +int Id
        +string Name
        +int Hp
        +int Attack
    }

    class SchemaConfigGenerator {
        +Initialize(context)
        -SchemaParseResult ParseSchema(file)
        -string GenerateTableClass(schema)
        -string GenerateBindingsClass(schema)
        -string GetSchemaBaseName(path)
        -string GetSchemaRelativePath(path)
    }

    SchemaConfigGenerator --> SchemaFileSpec : uses
    SchemaConfigGenerator ..> MonsterConfigBindings : generates
    SchemaConfigGenerator ..> MonsterTable : generates
    SchemaConfigGenerator ..> MonsterConfig : generates

    MonsterConfigBindings ..> YamlConfigLoader : extension RegisterMonsterTable
    MonsterConfigBindings ..> IConfigRegistry : extension GetMonsterTable, TryGetMonsterTable
    MonsterConfigBindings ..> MonsterTable : constructs

    MonsterTable ..|> IConfigTable~int, MonsterConfig~ : implements
    IConfigRegistry ..> IConfigTable~TKey, TValue~ : returns

    MonsterConfig <-- MonsterTable : wraps values

    SchemaFileSpec o--> SchemaObjectSpec : RootObject
Loading

File-Level Changes

Change Details Files
Generate per-entity config binding helpers for registration and lookup over YamlConfigLoader and IConfigRegistry.
  • Add GenerateBindingsClass to emit a static *ConfigBindings helper with constants for table name, config relative path, and schema relative path.
  • Generate extension methods on YamlConfigLoader to register typed tables using schema-derived conventions, including key selector and comparer.
  • Generate extension methods on IConfigRegistry to get and try-get strongly typed table wrappers by schema-derived table name.
GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs
Enrich schema parsing/model with naming and path metadata used by the new bindings generator.
  • Compute schema base name and pass it, plus entity name, into SchemaFileSpec when parsing schemas.
  • Extend SchemaFileSpec record with EntityName, KeyPropertyName, TableRegistrationName, ConfigRelativePath, and SchemaRelativePath fields.
  • Add GetSchemaRelativePath helper to normalize schema file paths, preferring segments under a schemas/ directory or falling back to a default path.
GFramework.SourceGenerators/Config/SchemaConfigGenerator.cs
Update tests to cover the new generated bindings and introduce minimal stubs for runtime abstractions used by the generator.
  • Extend the snapshot test description and sample runtime API stubs to include IConfigRegistry and YamlConfigLoader.RegisterTable overload used by the bindings.
  • Add snapshot assertions for the new *ConfigBindings.g.cs output alongside existing config and table snapshots.
  • Introduce a new MonsterConfigBindings.g.txt snapshot file containing the expected bindings output.
GFramework.SourceGenerators.Tests/Config/SchemaConfigGeneratorSnapshotTests.cs
GFramework.SourceGenerators.Tests/Config/snapshots/SchemaConfigGenerator/MonsterConfigBindings.g.txt
Align documentation with the new generated registration/access helpers and recommended usage patterns.
  • Document that the source generator now produces config types, table wrappers, and registration/access helpers.
  • Update runtime integration docs to show using generated RegisterXxxTable/GetXxxTable helpers instead of manual RegisterTable calls, and explain what conventions are baked into the helpers.
  • Clarify that advanced scenarios can still use the raw YamlConfigLoader.RegisterTable API and enumerate all generator outputs (config type, table wrapper, loader/registry helpers).
docs/zh-CN/game/config-system.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我发现了 1 个问题。

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="GFramework.SourceGenerators.Tests/Config/snapshots/SchemaConfigGenerator/MonsterConfigBindings.g.txt" line_range="8-17" />
<code_context>
+///     The helper centralizes table naming, config directory, schema path, and strong-typed registry access so consumer projects do not need to duplicate the same conventions.
</code_context>
<issue_to_address>
**issue (typo):** 在这些 XML 注释中请使用更常见的表达方式 "strongly-typed",而不是 "strong-typed"。

在这些 XML 文档注释中,"strong-typed" 应该改为 "strongly-typed"(或 "strongly typed"),以符合标准的 .NET 术语。请更新所有出现的位置,使措辞更加自然。

建议修改为:

```
    ///     Auto-generated registration and lookup helpers for schema file 'monster.schema.json'.
    ///     The helper centralizes table naming, config directory, schema path, and strongly-typed registry access so consumer projects do not need to duplicate the same conventions.

```

在类似的生成绑定文件或相关快照文件中,可能还存在其他 "strong-typed" 的用法。为了保持一致性,请在整个解决方案中搜索(尤其是 `GFramework.SourceGenerators.Tests/Config/snapshots/SchemaConfigGenerator/` 目录下)所有 "strong-typed" 的出现,并在 XML 注释中将其全部替换为 "strongly-typed"(或者如果你更喜欢这种风格,也可以用 "strongly typed"),并与此处选定的表达方式保持一致。
</issue_to_address>

Sourcery 对开源项目免费——如果你觉得我们的代码审查有帮助,欢迎分享 ✨
帮我变得更有用!请对每条评论点 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="GFramework.SourceGenerators.Tests/Config/snapshots/SchemaConfigGenerator/MonsterConfigBindings.g.txt" line_range="8-17" />
<code_context>
+///     The helper centralizes table naming, config directory, schema path, and strong-typed registry access so consumer projects do not need to duplicate the same conventions.
</code_context>
<issue_to_address>
**issue (typo):** Use the more standard phrasing "strongly-typed" instead of "strong-typed" in these XML comments.

In these XML doc comments, "strong-typed" should be "strongly-typed" (or "strongly typed") to match standard .NET terminology. Please update all occurrences for more natural wording.

Suggested implementation:

```
    ///     Auto-generated registration and lookup helpers for schema file 'monster.schema.json'.
    ///     The helper centralizes table naming, config directory, schema path, and strongly-typed registry access so consumer projects do not need to duplicate the same conventions.

```

There may be other occurrences of "strong-typed" in similar generated bindings or related snapshot files. For consistency, search the entire solution (especially under `GFramework.SourceGenerators.Tests/Config/snapshots/SchemaConfigGenerator/`) for "strong-typed" and replace all instances in XML comments with "strongly-typed" (or "strongly typed" if you prefer that style), matching the chosen phrasing here.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

GeWuYou added 2 commits April 3, 2026 09:53
- 实现了根据JSON schema自动生成配置类型和配置表包装的功能
- 支持嵌套对象、对象数组、标量数组的类型生成
- 提供可映射的default/enum/ref-table元数据支持
- 生成强类型的配置表包装器和运行时绑定辅助类
- 实现了完整的schema解析和C#代码生成功能
- 添加了详细的XML文档注释和错误诊断功能
- 引入 System.Globalization 用于区域设置相关操作
- 添加 System.IO 支持文件输入输出功能
- 集成 System.Text 提供文本处理能力
- 包含 System.Text.Json 用于 JSON 序列化反序列化
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant