create-yss-spec 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-domain/SKILL.md +2 -2
- package/template/.agents/skills/yss-dto/SKILL.md +19 -4
- package/template/.agents/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-dto/references/README.md +9 -2
- package/template/.agents/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.agents/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.agents/skills/yss-repository/SKILL.md +2 -2
- package/template/.agents/skills/yss-router/references/boundaries.md +0 -3
- package/template/.agents/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.agents/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.claude/skills/yss-domain/SKILL.md +2 -2
- package/template/.claude/skills/yss-dto/SKILL.md +19 -4
- package/template/.claude/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.claude/skills/yss-dto/references/README.md +9 -2
- package/template/.claude/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.claude/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.claude/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.claude/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.claude/skills/yss-repository/SKILL.md +2 -2
- package/template/.claude/skills/yss-router/references/boundaries.md +0 -3
- package/template/.claude/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.claude/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.claude/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-domain/SKILL.md +2 -2
- package/template/.codex/skills/yss-dto/SKILL.md +19 -4
- package/template/.codex/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-dto/references/README.md +9 -2
- package/template/.codex/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.codex/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.codex/skills/yss-repository/SKILL.md +2 -2
- package/template/.codex/skills/yss-router/references/boundaries.md +0 -3
- package/template/.codex/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.github/workflows/template-node-tooling.yml +2 -0
- package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.hermes/skills/yss-domain/SKILL.md +2 -2
- package/template/.hermes/skills/yss-dto/SKILL.md +19 -4
- package/template/.hermes/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.hermes/skills/yss-dto/references/README.md +9 -2
- package/template/.hermes/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.hermes/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.hermes/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.hermes/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.hermes/skills/yss-repository/SKILL.md +2 -2
- package/template/.hermes/skills/yss-router/references/boundaries.md +0 -3
- package/template/.hermes/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.hermes/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.hermes/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-domain/SKILL.md +2 -2
- package/template/.pi/skills/yss-dto/SKILL.md +19 -4
- package/template/.pi/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-dto/references/README.md +9 -2
- package/template/.pi/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.pi/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.pi/skills/yss-repository/SKILL.md +2 -2
- package/template/.pi/skills/yss-router/references/boundaries.md +0 -3
- package/template/.pi/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.pi/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.qoder/skills/yss-domain/SKILL.md +2 -2
- package/template/.qoder/skills/yss-dto/SKILL.md +19 -4
- package/template/.qoder/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.qoder/skills/yss-dto/references/README.md +9 -2
- package/template/.qoder/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.qoder/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.qoder/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.qoder/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.qoder/skills/yss-repository/SKILL.md +2 -2
- package/template/.qoder/skills/yss-router/references/boundaries.md +0 -3
- package/template/.qoder/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.qoder/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.qoder/skills/yss-web-controller/SKILL.md +1 -1
- package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
- package/template/.trae/skills/yss-domain/SKILL.md +2 -2
- package/template/.trae/skills/yss-dto/SKILL.md +19 -4
- package/template/.trae/skills/yss-dto/agents/openai.yaml +1 -1
- package/template/.trae/skills/yss-dto/references/README.md +9 -2
- package/template/.trae/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
- package/template/.trae/skills/yss-mybatis/SKILL.md +1 -1
- package/template/.trae/skills/yss-openapi-draft-review/SKILL.md +18 -6
- package/template/.trae/skills/yss-openapi-governance/SKILL.md +11 -1
- package/template/.trae/skills/yss-repository/SKILL.md +2 -2
- package/template/.trae/skills/yss-router/references/boundaries.md +0 -3
- package/template/.trae/skills/yss-source-index/references/source-map-config.md +0 -2
- package/template/.trae/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
- package/template/.trae/skills/yss-web-controller/SKILL.md +1 -1
- package/template/CONTEXT.md +4 -0
- package/template/docs/api/templates/openapi-draft-review-checklist.md +6 -0
- package/template/scripts/lib/scenario-checks.mjs +21 -0
- package/template/scripts/lib/skill-supply-chain.mjs +1 -1
- package/template/scripts/verify-template +4 -2
- package/template/scripts/verify-yss-dto-openapi-profile +109 -0
- package/template/scripts/verify-yss-dto-openapi-scenarios +4 -0
- package/template/skills-lock.json +10 -55
- package/template/wiki/wiki/YSS/345/267/245/347/250/213/346/212/200/350/203/275/344/275/223/347/263/273.md +1 -1
- package/template/yss-public-skills.json +1 -7
- package/template.manifest.json +3 -1
- package/template.snapshot.json +4 -4
- package/template/.agents/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.agents/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.agents/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.agents/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.agents/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.agents/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.agents/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.agents/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.agents/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.agents/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.agents/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.agents/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.agents/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.agents/skills/yss-valuation/SKILL.md +0 -40
- package/template/.agents/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.agents/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.agents/skills/yss-variable/SKILL.md +0 -47
- package/template/.agents/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.agents/skills/yss-variable/references/source-index.md +0 -32
- package/template/.claude/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.claude/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.claude/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.claude/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.claude/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.claude/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.claude/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.claude/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.claude/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.claude/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.claude/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.claude/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.claude/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.claude/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.claude/skills/yss-valuation/SKILL.md +0 -40
- package/template/.claude/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.claude/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.claude/skills/yss-variable/SKILL.md +0 -47
- package/template/.claude/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.claude/skills/yss-variable/references/source-index.md +0 -32
- package/template/.codex/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.codex/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.codex/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.codex/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.codex/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.codex/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.codex/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.codex/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.codex/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.codex/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.codex/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.codex/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.codex/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.codex/skills/yss-valuation/SKILL.md +0 -40
- package/template/.codex/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.codex/skills/yss-variable/SKILL.md +0 -47
- package/template/.codex/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-variable/references/source-index.md +0 -32
- package/template/.hermes/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.hermes/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.hermes/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.hermes/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.hermes/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.hermes/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.hermes/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.hermes/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.hermes/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.hermes/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.hermes/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.hermes/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.hermes/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.hermes/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.hermes/skills/yss-valuation/SKILL.md +0 -40
- package/template/.hermes/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.hermes/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.hermes/skills/yss-variable/SKILL.md +0 -47
- package/template/.hermes/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.hermes/skills/yss-variable/references/source-index.md +0 -32
- package/template/.pi/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.pi/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.pi/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.pi/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.pi/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.pi/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.pi/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.pi/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.pi/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.pi/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.pi/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.pi/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.pi/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.pi/skills/yss-valuation/SKILL.md +0 -40
- package/template/.pi/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.pi/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.pi/skills/yss-variable/SKILL.md +0 -47
- package/template/.pi/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.pi/skills/yss-variable/references/source-index.md +0 -32
- package/template/.qoder/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.qoder/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.qoder/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.qoder/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.qoder/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.qoder/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.qoder/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.qoder/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.qoder/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.qoder/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.qoder/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.qoder/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.qoder/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.qoder/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.qoder/skills/yss-valuation/SKILL.md +0 -40
- package/template/.qoder/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.qoder/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.qoder/skills/yss-variable/SKILL.md +0 -47
- package/template/.qoder/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.qoder/skills/yss-variable/references/source-index.md +0 -32
- package/template/.trae/skills/yss-db2mybatis/SKILL.md +0 -95
- package/template/.trae/skills/yss-db2mybatis/agents/openai.yaml +0 -5
- package/template/.trae/skills/yss-db2mybatis/assets/$.java +0 -19
- package/template/.trae/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
- package/template/.trae/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
- package/template/.trae/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
- package/template/.trae/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
- package/template/.trae/skills/yss-db2mybatis/assets/po.java.template +0 -18
- package/template/.trae/skills/yss-db2mybatis/assets/repository.java.template +0 -7
- package/template/.trae/skills/yss-db2mybatis/config/metadata.json +0 -334
- package/template/.trae/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
- package/template/.trae/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
- package/template/.trae/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
- package/template/.trae/skills/yss-db2mybatis/references/type-mapping.json +0 -31
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
- package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
- package/template/.trae/skills/yss-valuation/SKILL.md +0 -40
- package/template/.trae/skills/yss-valuation/agents/openai.yaml +0 -4
- package/template/.trae/skills/yss-valuation/references/source-index.md +0 -37
- package/template/.trae/skills/yss-variable/SKILL.md +0 -47
- package/template/.trae/skills/yss-variable/agents/openai.yaml +0 -4
- package/template/.trae/skills/yss-variable/references/source-index.md +0 -32
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
schema_version: 1
|
|
2
|
+
kind: yss-dto-openapi-wire-profile
|
|
3
|
+
|
|
4
|
+
# This profile is the reusable mapping source consumed by the OpenAPI skills.
|
|
5
|
+
# It describes the public HTTP/JSON shape, not every Java field or getter.
|
|
6
|
+
canonical:
|
|
7
|
+
java_package: com.yss.cloud.dto.result
|
|
8
|
+
type_parameter:
|
|
9
|
+
name: T
|
|
10
|
+
java_bound: java.io.Serializable
|
|
11
|
+
openapi:
|
|
12
|
+
response_meta_schema: YssResultMeta
|
|
13
|
+
concrete_schema_composition: allOf
|
|
14
|
+
response_wrapper_extension: x-yss-response-wrapper
|
|
15
|
+
literal_java_generic_schema: false
|
|
16
|
+
|
|
17
|
+
compatibility_packages:
|
|
18
|
+
- java_package: com.yss.cloud.dto.response
|
|
19
|
+
status: legacy-or-compatibility
|
|
20
|
+
use_for_new_contracts: false
|
|
21
|
+
policy: do-not-introduce-in-new-contracts
|
|
22
|
+
|
|
23
|
+
common_response:
|
|
24
|
+
schema_name: YssResultMeta
|
|
25
|
+
fields:
|
|
26
|
+
success:
|
|
27
|
+
direction: response
|
|
28
|
+
wire_types: [boolean]
|
|
29
|
+
nullable: false
|
|
30
|
+
required: true
|
|
31
|
+
dataType:
|
|
32
|
+
direction: response
|
|
33
|
+
wire_types: [string, "null"]
|
|
34
|
+
nullable: true
|
|
35
|
+
required: true
|
|
36
|
+
code:
|
|
37
|
+
direction: response
|
|
38
|
+
wire_types: [string, integer, "null"]
|
|
39
|
+
nullable: true
|
|
40
|
+
required: true
|
|
41
|
+
policy: do-not-widen-global-wrapper
|
|
42
|
+
message:
|
|
43
|
+
direction: response
|
|
44
|
+
wire_types: [string, "null"]
|
|
45
|
+
nullable: true
|
|
46
|
+
required: true
|
|
47
|
+
tips:
|
|
48
|
+
direction: response
|
|
49
|
+
wire_types: [string, "null"]
|
|
50
|
+
nullable: true
|
|
51
|
+
required: true
|
|
52
|
+
|
|
53
|
+
wrappers:
|
|
54
|
+
SingleResult:
|
|
55
|
+
java_type: com.yss.cloud.dto.result.SingleResult<T>
|
|
56
|
+
response_kind: single
|
|
57
|
+
data:
|
|
58
|
+
direction: response
|
|
59
|
+
wire_shape: endpoint-schema-or-null
|
|
60
|
+
nullable: true
|
|
61
|
+
required: true
|
|
62
|
+
MultiResult:
|
|
63
|
+
java_type: com.yss.cloud.dto.result.MultiResult<T>
|
|
64
|
+
response_kind: non-page-list
|
|
65
|
+
data:
|
|
66
|
+
direction: response
|
|
67
|
+
wire_types: [array]
|
|
68
|
+
items: endpoint-schema
|
|
69
|
+
nullable: false
|
|
70
|
+
required: true
|
|
71
|
+
empty_value: []
|
|
72
|
+
PageResult:
|
|
73
|
+
java_type: com.yss.cloud.dto.result.PageResult<T>
|
|
74
|
+
response_kind: page
|
|
75
|
+
fields:
|
|
76
|
+
totalCount:
|
|
77
|
+
direction: response
|
|
78
|
+
wire_types: [integer]
|
|
79
|
+
format: int64
|
|
80
|
+
minimum: 0
|
|
81
|
+
nullable: false
|
|
82
|
+
required: true
|
|
83
|
+
pageSize:
|
|
84
|
+
direction: response
|
|
85
|
+
wire_types: [integer]
|
|
86
|
+
format: int32
|
|
87
|
+
minimum: 1
|
|
88
|
+
nullable: false
|
|
89
|
+
required: true
|
|
90
|
+
pageIndex:
|
|
91
|
+
direction: response
|
|
92
|
+
wire_types: [integer]
|
|
93
|
+
format: int32
|
|
94
|
+
minimum: 1
|
|
95
|
+
nullable: false
|
|
96
|
+
required: true
|
|
97
|
+
data:
|
|
98
|
+
direction: response
|
|
99
|
+
wire_types: [array]
|
|
100
|
+
items: endpoint-schema
|
|
101
|
+
nullable: false
|
|
102
|
+
required: true
|
|
103
|
+
empty_value: []
|
|
104
|
+
computed_fields:
|
|
105
|
+
totalPages:
|
|
106
|
+
java_getter: getTotalPages
|
|
107
|
+
status: mapper-dependent
|
|
108
|
+
policy: include-only-with-target-wire-evidence
|
|
109
|
+
|
|
110
|
+
page_query:
|
|
111
|
+
java_type: com.yss.cloud.dto.page.PageQuery
|
|
112
|
+
request_direction: query
|
|
113
|
+
fields:
|
|
114
|
+
pageIndex:
|
|
115
|
+
direction: request
|
|
116
|
+
wire_types: [integer]
|
|
117
|
+
format: int32
|
|
118
|
+
minimum: 1
|
|
119
|
+
default: 1
|
|
120
|
+
nullable: false
|
|
121
|
+
required: false
|
|
122
|
+
pageSize:
|
|
123
|
+
direction: request
|
|
124
|
+
wire_types: [integer]
|
|
125
|
+
format: int32
|
|
126
|
+
minimum: 1
|
|
127
|
+
default: 10
|
|
128
|
+
nullable: false
|
|
129
|
+
required: false
|
|
130
|
+
orderBy:
|
|
131
|
+
direction: request
|
|
132
|
+
wire_types: [string, "null"]
|
|
133
|
+
nullable: true
|
|
134
|
+
required: false
|
|
135
|
+
policy: endpoint-whitelist-required
|
|
136
|
+
orderDirection:
|
|
137
|
+
direction: request
|
|
138
|
+
wire_types: [string]
|
|
139
|
+
enum: [ASC, DESC]
|
|
140
|
+
default: DESC
|
|
141
|
+
nullable: false
|
|
142
|
+
required: false
|
|
143
|
+
groupBy:
|
|
144
|
+
direction: request
|
|
145
|
+
wire_types: [string, "null"]
|
|
146
|
+
nullable: true
|
|
147
|
+
required: false
|
|
148
|
+
policy: endpoint-whitelist-required
|
|
149
|
+
forbidden_client_fields:
|
|
150
|
+
- offset
|
|
151
|
+
- needTotalCount
|
|
152
|
+
- tempTotalCount
|
|
153
|
+
computed_fields:
|
|
154
|
+
offset:
|
|
155
|
+
java_getter: getOffset
|
|
156
|
+
status: computed
|
|
157
|
+
policy: exclude-from-client-input
|
|
158
|
+
needTotalCount:
|
|
159
|
+
java_getter: isNeedTotalCount
|
|
160
|
+
status: internal-or-ignored
|
|
161
|
+
policy: exclude-from-client-input
|
|
162
|
+
tempTotalCount:
|
|
163
|
+
java_getter: getTempTotalCount
|
|
164
|
+
status: internal-or-ignored
|
|
165
|
+
policy: exclude-from-client-input
|
|
166
|
+
|
|
167
|
+
request_bases:
|
|
168
|
+
command:
|
|
169
|
+
java_type: com.yss.cloud.dto.CommandDTO
|
|
170
|
+
direction: request
|
|
171
|
+
query:
|
|
172
|
+
java_type: com.yss.cloud.dto.QueryDTO
|
|
173
|
+
direction: request
|
|
174
|
+
extends: command
|
|
175
|
+
|
|
176
|
+
wire_evidence:
|
|
177
|
+
required_before_freeze:
|
|
178
|
+
- target-http-mapper-identity
|
|
179
|
+
- representative-serialization-fixtures
|
|
180
|
+
- contract-test-or-equivalent-http-evidence
|
|
181
|
+
rule: Java fields and computed getters are not public wire facts until target-boundary evidence confirms them.
|
|
@@ -12,7 +12,8 @@ Use this skill after OpenAPI Draft creation and before Engineering Baseline / YS
|
|
|
12
12
|
- OpenAPI Draft under `docs/.scratch/<feature>/api/<feature>.yaml`,作为唯一权威的单一 OAS 3.1 YAML document;生命周期元数据和 Freeze 决策位于相邻 Markdown 记录。
|
|
13
13
|
- Calibrated Spec.
|
|
14
14
|
- Interaction spec / prototype review when UI exists.
|
|
15
|
-
- YSS engineering baseline rules
|
|
15
|
+
- YSS engineering baseline rules and `.agents/skills/yss-dto/references/openapi-wire-profile.yaml`;先运行 `scripts/verify-yss-dto-openapi-profile`。
|
|
16
|
+
- 若 Draft 包含 computed getter(例如 `totalPages`),必须提供目标 HTTP mapper identity、代表性序列化 fixture 和 contract-test / 等价 HTTP evidence。
|
|
16
17
|
|
|
17
18
|
## Review Flow
|
|
18
19
|
|
|
@@ -20,13 +21,16 @@ Use this skill after OpenAPI Draft creation and before Engineering Baseline / YS
|
|
|
20
21
|
2. Build a P0 traceability matrix from Spec functional requirements and interaction actions to OpenAPI paths, schemas, errors, and contract tests. Each UI action must map to a stable `operationId` and `x-yss-action-key` or an equivalent traceability entry.
|
|
21
22
|
3. Check page action coverage: every action has `actionKey`, endpoint or explicit non-goal, state transition, idempotency/concurrency rule, and error codes. When the Spec explicitly changes authentication or authorization behavior, trace that behavior through the same matrix.
|
|
22
23
|
4. Check object lifecycle coverage: manage/maintain/configure/create/update/archive/retry/cancel/publish/export/create-draft semantics have endpoints or explicit scope downgrades.
|
|
23
|
-
5. Check YSS API baseline: REST shape, `
|
|
24
|
-
6. Check
|
|
25
|
-
7.
|
|
24
|
+
5. Check YSS API baseline: REST shape, `x-yss-response-wrapper` values `SingleResult|MultiResult|PageResult`, `YssResultMeta` plus `allOf` concrete schemas, and stable DTO/schema names. The Java generic notation is a review shorthand only; it must not appear as an OpenAPI type or `$ref`.
|
|
25
|
+
6. Check DTO wire shape against the profile: `success` is boolean, `dataType` is `string|null`, `code` is only `string|integer|null`, list/page `data` is an array, and single `data` points to the endpoint schema with explicit nullability. Check response/request direction separately.
|
|
26
|
+
7. Check pagination input: only `pageIndex/pageSize/orderBy/orderDirection/groupBy` are client fields; `orderDirection` is `ASC|DESC`; `orderBy` / `groupBy` use endpoint whitelists; `offset`, `needTotalCount`, and `tempTotalCount` are negative assertions. `totalPages` is mapper-dependent and cannot enter a shared schema without fresh wire evidence.
|
|
27
|
+
8. Check error contracts: field-level errors, model-level errors, disabled reasons, gate failures, and conflict responses. When the Spec explicitly changes authentication or authorization behavior, include its `401` / `403` and resource-filtering semantics here.
|
|
28
|
+
9. Output a persistent review artifact under `docs/.scratch/<feature>/architecture/` or update the existing one.
|
|
26
29
|
|
|
27
30
|
## Automation Boundary
|
|
28
31
|
|
|
29
32
|
- Automated checks own YAML single-document syntax, `$ref` resolution, path-parameter consistency, OpenAPI lint, and stable machine-checkable style rules.
|
|
33
|
+
- `scripts/verify-yss-dto-openapi-profile` owns the reusable DTO mapping invariants; the review still checks each endpoint's concrete schema, wrapper extension and evidence.
|
|
30
34
|
- Human or independent semantic review owns P0 traceability, page-action coverage, error behavior, concurrency/idempotency, scope downgrades, contract-test seams, and any explicitly specified authentication or authorization behavior.
|
|
31
35
|
- Fresh passing automation evidence may be referenced by the semantic review; copying the same findings into a second checklist is unnecessary.
|
|
32
36
|
- Re-run structural automation only when the Draft, ruleset, or referenced schema changes.
|
|
@@ -38,7 +42,9 @@ Block if any of these are true:
|
|
|
38
42
|
- A P0 requirement has no endpoint, schema, error contract, or explicit non-goal.
|
|
39
43
|
- A UI action has no endpoint/non-goal mapping.
|
|
40
44
|
- A configurable rule or gate lacks a source, owner, fixed/default decision, or API representation.
|
|
41
|
-
- Pagination does not align with
|
|
45
|
+
- Pagination does not align with the `PageResult` profile or documented exception, or exposes `offset` / `needTotalCount` / `tempTotalCount` as client input.
|
|
46
|
+
- A response omits `x-yss-response-wrapper`, uses the compatibility `com.yss.cloud.dto.response` package for a new contract, writes Java generic notation as an OAS schema, or fails `YssResultMeta` + `allOf` + concrete `data` mapping.
|
|
47
|
+
- `code` is modeled as arbitrary object, `dataType` loses explicit nullability, or computed fields such as `totalPages` lack target wire evidence.
|
|
42
48
|
- Draft has no contract test seam for import, mapping coverage, validation, review, publish, export, and optimistic locking.
|
|
43
49
|
- YAML contains lifecycle frontmatter / root metadata, or the proposed JSON client input is not explicitly deferred until Freeze and governance export.
|
|
44
50
|
|
|
@@ -58,9 +64,15 @@ Block if any of these are true:
|
|
|
58
64
|
- <P0 requirement -> endpoint/schema/error/test mapping summary>
|
|
59
65
|
|
|
60
66
|
### YSS Baseline
|
|
61
|
-
-
|
|
67
|
+
- <`x-yss-response-wrapper` map and `YssResultMeta` / `allOf` conformance>
|
|
68
|
+
- <profile version, concrete `data` schemas, nullability, request/response direction and computed-field evidence>
|
|
69
|
+
- <DDD boundary implications, implementation feasibility>
|
|
62
70
|
|
|
63
71
|
### Contract Test Checklist
|
|
72
|
+
- <wrapper meta fields: success/code/message/tips/dataType, including code string/integer/null cases>
|
|
73
|
+
- <single object, non-page list empty array, page empty array and page boundary cases>
|
|
74
|
+
- <PageQuery allowed fields, ASC/DESC and endpoint whitelist; negative assertions for offset/needTotalCount/tempTotalCount>
|
|
75
|
+
- <target HTTP mapper identity and computed-field fixture, if totalPages or another getter is included>
|
|
64
76
|
- <minimum contract tests before OpenAPI Freeze>
|
|
65
77
|
|
|
66
78
|
### Next Action
|
|
@@ -13,12 +13,15 @@ Spec / 设计输入 → OpenAPI YAML Draft → 审查与 Freeze → JSON 派生
|
|
|
13
13
|
|
|
14
14
|
`docs/.scratch/<feature>/api/<feature>.yaml` 是唯一权威的 OpenAPI 3.1 契约。JSON 只能由冻结后的 YAML 可复现地产生,用于前端代码生成或分发;不得手写、不得反向覆盖 YAML、不得把运行时代码当成设计契约来源。
|
|
15
15
|
|
|
16
|
+
YSS DTO 的可复用 HTTP/JSON 映射由 `.agents/skills/yss-dto/references/openapi-wire-profile.yaml` 单一维护。它描述公开 wire shape,不是 Java 字段或 getter 清单;本 skill 必须消费 profile,不能在治理文档、feature YAML 和 JSON 中各自发明 `SingleResult`、`PageResult` 或 `PageQuery` 字段表。
|
|
17
|
+
|
|
16
18
|
## 边界与职责
|
|
17
19
|
|
|
18
20
|
使用 `yss-openapi-governance`:
|
|
19
21
|
|
|
20
22
|
- 基于冻结前的 Spec、产品设计、架构约束创建或更新 `docs/.scratch/<feature>/api/<feature>.yaml`。
|
|
21
23
|
- 保证 YAML 是单一 YAML document、根节点为 `openapi: 3.1.0`,且不把 `pipeline`、`stage`、`status`、`owner` 等生命周期元数据写入 OpenAPI 根节点。
|
|
24
|
+
- 按 `yss-dto` wire profile 校验 `com.yss.cloud.dto.result` canonical 包、`YssResultMeta` 公共字段、具体 wrapper schema、请求 / 响应方向和分页负向字段。
|
|
22
25
|
- 运行受项目 lockfile 约束的 lint / bundle,检查 `$ref`、operationId、响应包装、错误、分页、幂等和契约测试 seam;只有 Spec 明确改变认证或授权行为时才检查对应契约。
|
|
23
26
|
- 在 OpenAPI Freeze 后,用锁定的 Redocly CLI 将 YAML bundle 为 JSON,并记录可重现证据。
|
|
24
27
|
- 维护治理记录、Freeze 记录和 JSON 派生记录。
|
|
@@ -59,7 +62,9 @@ pnpm exec redocly bundle \
|
|
|
59
62
|
2. **运行结构与治理校验**
|
|
60
63
|
- 先执行项目锁定的 `pnpm exec redocly lint` 或等价 CI 脚本。
|
|
61
64
|
- 检查 YAML 可解析、`$ref` 可解析、路径参数完整、operationId 唯一、examples 合法、schema 命名稳定。
|
|
62
|
-
-
|
|
65
|
+
- 先运行 `scripts/verify-yss-dto-openapi-profile`,并记录 profile 版本;检查 `/api/v1/` 版本策略(或记录例外)、`x-yss-response-wrapper`、`YssResultMeta` + `allOf` 具体 schema、统一错误结构、分页、幂等 / 乐观锁和契约测试 seam。
|
|
66
|
+
- 每个响应都必须落成具体 endpoint schema:`SingleResult` 的 `data` 是具体对象或显式 nullable schema,`MultiResult` / `PageResult` 的 `data` 是数组;Java 的 `SingleResult<T>` / `PageResult<T>` 只能作为语义说明,不能直接写成 OAS type 或 `$ref`。
|
|
67
|
+
- `code` 按 profile 只允许 `string | integer | null`,`dataType` 按 profile 为 `string | null`;`offset`、`needTotalCount`、`tempTotalCount` 不得进入客户端分页输入;`totalPages` 只有目标 HTTP mapper / fixture 证明后才能进入契约。Spec 明确改变认证或授权行为时,把对应 `401` / `403`、资源过滤和错误语义作为普通 API 行为检查。
|
|
63
68
|
|
|
64
69
|
3. **独立 Draft Review 与 Freeze**
|
|
65
70
|
- 将 fresh lint 证据交给 `yss-openapi-draft-review`;阻断项未关闭前,YAML 仍是 review-only Draft,不得生成生产客户端。
|
|
@@ -85,6 +90,9 @@ pnpm exec redocly bundle \
|
|
|
85
90
|
- YAML / `$ref` / lint 不通过,operationId 不稳定或不唯一,或路径参数、schema、examples 无法解析。
|
|
86
91
|
- P0 操作缺请求、响应、错误、并发 / 幂等规则或可验证 seam;Spec 明确的认证或授权行为没有契约表示。
|
|
87
92
|
- `$ref` 超出允许范围,或转换器版本、lockfile、命令、输入 YAML 无法识别。
|
|
93
|
+
- `scripts/verify-yss-dto-openapi-profile` 失败、profile 版本未记录,或 Draft 未按 profile 建模 `x-yss-response-wrapper`、`YssResultMeta` / `allOf` 和具体 `data` schema。
|
|
94
|
+
- 新契约引入 `com.yss.cloud.dto.response`、把 Java 泛型文字当成 OAS schema、把全局 `code` 放宽为任意 object,或把 `offset` / `needTotalCount` / `tempTotalCount` 作为客户端字段。
|
|
95
|
+
- `totalPages`、任何 computed getter 或 Lombok / `@JsonIgnore` 推导字段没有目标 mapper identity、代表性序列化 fixture 和 contract-test / 等价 HTTP 证据。
|
|
88
96
|
- Freeze 记录、YAML SHA-256、JSON SHA-256、JSON 解析 / lint 证据缺失。
|
|
89
97
|
- JSON 被手工编辑,或生成结果试图反向成为 YAML 的权威来源。
|
|
90
98
|
|
|
@@ -102,6 +110,8 @@ pnpm exec redocly bundle \
|
|
|
102
110
|
|
|
103
111
|
### Validation
|
|
104
112
|
- Lint command and result: <locked pnpm command / result>
|
|
113
|
+
- YSS DTO wire profile: <`.agents/skills/yss-dto/references/openapi-wire-profile.yaml`, schema_version, verifier result>
|
|
114
|
+
- Wrapper conformance: <`x-yss-response-wrapper`, `YssResultMeta`, `allOf`, concrete data schema, direction and forbidden-field result>
|
|
105
115
|
- `$ref` policy / approved exceptions: <details>
|
|
106
116
|
- Blocking findings: <file:line grounded finding>
|
|
107
117
|
|
|
@@ -23,7 +23,7 @@ description: Use when generating or refactoring YSS persistence models, BaseRepo
|
|
|
23
23
|
|
|
24
24
|
1. 先确认输入来源:领域模型、metadata、数据库表、DDL。
|
|
25
25
|
2. 探测持久化 profile:新 DDD 默认 `PO <-> Domain Model`;legacy YSS 常见 `Entity + BaseRepository + GatewayImpl`。沿用现有工程命名,不混用两套模型。
|
|
26
|
-
3. 如果 metadata
|
|
26
|
+
3. 如果 metadata 不完整,先补齐 metadata、数据库表结构或 DDL 输入。
|
|
27
27
|
4. 涉及 POJO 字段、getter/setter、constructor、builder 或日志时,必须加载并遵守 `lombok`。
|
|
28
28
|
5. 涉及持久化模型与 Domain/VO/CMD 转换时,必须加载并遵守 `mapstruct`。
|
|
29
29
|
6. 生成代码时严格保持 Domain 与 Infrastructure 分层边界。
|
|
@@ -57,7 +57,7 @@ description: Use when generating or refactoring YSS persistence models, BaseRepo
|
|
|
57
57
|
|
|
58
58
|
## 协同顺序
|
|
59
59
|
|
|
60
|
-
- metadata
|
|
60
|
+
- metadata / DDL 输入准备:确认输入完整
|
|
61
61
|
- 领域建模:`yss-domain`
|
|
62
62
|
- POJO 样板代码:`lombok`
|
|
63
63
|
- 对象转换:`mapstruct`
|
|
@@ -26,7 +26,6 @@ Default for a new page: first verify the approved product design, state matrix,
|
|
|
26
26
|
- `yss-backend-scaffold-application`: Application use cases, transaction boundaries, and cross-aggregate orchestration.
|
|
27
27
|
- `yss-repository`: Persistence implementation, PO, Repository, Convertor, GatewayImpl.
|
|
28
28
|
- `yss-web-controller`: REST adapter layer, request/response DTOs, VO, web convertor.
|
|
29
|
-
- `yss-db2mybatis`: Generate persistence artifacts from database metadata or DDL.
|
|
30
29
|
- `yss-mybatis`: Framework behavior for MyBatis/MyBatis-Plus, BaseRepository, pagination, mapper scanning, batch, datasource issues.
|
|
31
30
|
- `yss-dto`: Result/PageQuery/CommandDTO/QueryDTO and unified API contract objects.
|
|
32
31
|
|
|
@@ -48,9 +47,7 @@ Default for end-to-end backend CRUD: include Domain, Application, Infrastructure
|
|
|
48
47
|
- `yss-validation`: Validation engine and JSR-303 integration.
|
|
49
48
|
- `yss-security-algorithm`: RSA/AES/SM/JWT/JWK/password-encoding compatibility and production key-management safety gates.
|
|
50
49
|
- `yss-userinfo`: Current-user info propagation and starter integration.
|
|
51
|
-
- `yss-variable`: Variable component APIs and variable resolution.
|
|
52
50
|
- `yss-exception`: Exception component and unified exception handling.
|
|
53
|
-
- `yss-valuation`: Valuation component behavior.
|
|
54
51
|
|
|
55
52
|
Component skills should inspect generated `references/source-index.md` before changing code when the task depends on exact class or config names.
|
|
56
53
|
|
|
@@ -20,9 +20,7 @@ The refresh script maps component source path hints to skill references. These p
|
|
|
20
20
|
| `yss-validation` | `yss-microservice-components/yss-component-validation-engine-parent`, `yss-microservice-components/yss-component-validation-jsr303` |
|
|
21
21
|
| `yss-security-algorithm` | `yss-microservice-components/yss-component-security-algorithm` |
|
|
22
22
|
| `yss-userinfo` | `yss-microservice-components/yss-component-userinfo-starter` |
|
|
23
|
-
| `yss-variable` | `yss-microservice-components/yss-component-variable` |
|
|
24
23
|
| `yss-exception` | `yss-microservice-components/yss-component-exception` |
|
|
25
|
-
| `yss-valuation` | `yss-microservice-components/yss-component-valuation` |
|
|
26
24
|
|
|
27
25
|
Frontend docs are written to these skills:
|
|
28
26
|
|
|
@@ -5,7 +5,7 @@ import os from "node:os";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
|
-
const BACKEND = {"yss-cache":["yss-microservice-components/yss-component-cache-parent"],"yss-mybatis":["yss-microservice-components/yss-component-persistence"],"yss-dto":["yss-microservice-components/yss-component-dto"],"yss-audit-log":["yss-microservice-components/yss-component-audit-log"],"yss-excel-mvc":["yss-microservice-components/yss-component-excel-mvc","yss-microservice-components/yss-component-excel-starter"],"yss-distributed-id":["yss-microservice-components/yss-component-distributed-id","yss-microservice-components/yss-component-leaf"],"yss-jdbc":["yss-microservice-components/yss-component-jdbc"],"yss-dictionary":["yss-microservice-components/yss-component-dictionary-parent"],"yss-log":["yss-microservice-components/yss-component-log-starter"],"yss-resilience4j":["yss-microservice-components/yss-component-resilience4j-starter"],"yss-taskflow":["yss-microservice-components/yss-component-taskflow"],"yss-validation":["yss-microservice-components/yss-component-validation-engine-parent","yss-microservice-components/yss-component-validation-jsr303"],"yss-security-algorithm":["yss-microservice-components/yss-component-security-algorithm"],"yss-userinfo":["yss-microservice-components/yss-component-userinfo-starter"],"yss-
|
|
8
|
+
const BACKEND = {"yss-cache":["yss-microservice-components/yss-component-cache-parent"],"yss-mybatis":["yss-microservice-components/yss-component-persistence"],"yss-dto":["yss-microservice-components/yss-component-dto"],"yss-audit-log":["yss-microservice-components/yss-component-audit-log"],"yss-excel-mvc":["yss-microservice-components/yss-component-excel-mvc","yss-microservice-components/yss-component-excel-starter"],"yss-distributed-id":["yss-microservice-components/yss-component-distributed-id","yss-microservice-components/yss-component-leaf"],"yss-jdbc":["yss-microservice-components/yss-component-jdbc"],"yss-dictionary":["yss-microservice-components/yss-component-dictionary-parent"],"yss-log":["yss-microservice-components/yss-component-log-starter"],"yss-resilience4j":["yss-microservice-components/yss-component-resilience4j-starter"],"yss-taskflow":["yss-microservice-components/yss-component-taskflow"],"yss-validation":["yss-microservice-components/yss-component-validation-engine-parent","yss-microservice-components/yss-component-validation-jsr303"],"yss-security-algorithm":["yss-microservice-components/yss-component-security-algorithm"],"yss-userinfo":["yss-microservice-components/yss-component-userinfo-starter"],"yss-exception":["yss-microservice-components/yss-component-exception"]};
|
|
9
9
|
const FRONTEND={"yss-ui":["components","hooks","skills"],"yss-components":["components"],"yss-hook":["hooks"],"yss-page-module-development":["components","hooks","skills"],"yss-use-table-height":["hooks"],"yss-use-tree-height":["hooks"]};
|
|
10
10
|
const URLS={components:"http://192.168.164.27:3200/components",hooks:"http://192.168.164.27:3200/hooks",skills:"http://192.168.164.27:3200/skills"};
|
|
11
11
|
const KEYS=["Audit","Cache","Clear","Command","Configuration","Controller","DTO","Data","Enable","Excel","Handler","Interceptor","Jdbc","Mapper","Mybatis","Page","Properties","Query","Repository","Request","Response","Result","Update","Aspect","Leaf","Id","Dir","Dic","Dictionary","File","Upload","Log","Message","Mail","Liquibase","Circuit","Breaker","Sql","Tpl","Tag","Task","Flow","Report","Validation","Validator","Security","Crypto","User","Variable","Quality","Search","Similarity","Scheduler","Runner","Duck","Dynamic","Factory","Client","Feign","Gateway","Convertor","Adapter","Advice","Bridge","Route","Uploader","Sftp","Minio","Parser","Express","Rule","Template","Generator","Importer","Engine","Event","Submitter","Executor","Context","Status","Type","State"];
|
|
@@ -16,7 +16,7 @@ description: Use when generating or refactoring YSS Web Adapter Controllers, req
|
|
|
16
16
|
## 不适用
|
|
17
17
|
|
|
18
18
|
- 用户只是要新增一个手写复杂接口,不一定要用脚本。
|
|
19
|
-
- 用户还没有稳定的领域模型或 metadata,先补 `yss-domain`
|
|
19
|
+
- 用户还没有稳定的领域模型或 metadata,先补 `yss-domain` 并准备完整的 metadata 输入。
|
|
20
20
|
|
|
21
21
|
## 优先流程
|
|
22
22
|
|
package/template/CONTEXT.md
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
| `ready-for-agent` | 表示垂直切片已通过必要门禁并具备直接实现条件的流程状态。 | 不得用于 Spec 初稿、原型、OpenAPI Draft 或其他未冻结资产。 |
|
|
22
22
|
| OpenAPI Draft | review-only 的 OpenAPI 3.1 契约草案。 | Freeze 前不得作为前后端稳定实现契约。 |
|
|
23
23
|
| OpenAPI Freeze | 已通过评审、可作为前后端实现和契约测试输入的 OpenAPI 3.1 契约。 | Freeze 后变更必须回到 API 影响分析和设计审查。 |
|
|
24
|
+
| YSS 响应包装 | 对外 API 使用 `Result` 基础字段及 `SingleResult`、`MultiResult`、`PageResult` 表达单对象、非分页列表和分页查询结果的统一返回结构。 | Java 泛型记法是语义简称;公开 schema 必须落成具体 endpoint wire shape。 |
|
|
25
|
+
| DTO wire shape | DTO 在 HTTP/JSON 边界实际暴露的字段、类型、可空性和方向性;与 Java 字段、getter 或内部协作字段区分。 | 以目标 mapper / contract evidence 为准,不从 getter、Lombok 或 `@JsonIgnore` 机械推断。 |
|
|
24
26
|
| UI 影响 | 会改变用户可见页面、导航、交互流程、状态呈现或权限体验的功能影响。 | 纯后端、API、批处理或数据变更不自动构成 UI 影响。 |
|
|
25
27
|
| 产品设计影响 | UI 变化触及主流程、导航、权限体验、异常 / 恢复状态、状态流转或 API 反推,需要页面流、状态矩阵和原型校准。 | 文案、token、颜色、间距和无行为变化的孤立视觉修复属于 UI 影响,但不自动构成产品设计影响。 |
|
|
26
28
|
| 高保真 HTML 原型 | 低保真原型评审通过后,用于在浏览器中审查真实视觉密度、交互状态和页面流的产品设计资产。 | 不等同于生产前端实现,也不替代 OpenAPI、Spec 校准或垂直切片。 |
|
|
@@ -57,6 +59,8 @@
|
|
|
57
59
|
| 模板实例仓库(`project-instance`) | 由模板初始化后生成、承载某个具体产品研发生命周期资产的仓库身份。 | 不作为通用流程模板的权威来源。 |
|
|
58
60
|
| 模板实例分发面 | 模板源中应随 CLI 快照进入 `project-instance` 的共享生命周期、模板、用户指南和验证资产集合。 | 不包含模板源审查、研究、发布路线或源仓库专属 ADR。 |
|
|
59
61
|
| 模板源治理区 | 仅供 `template-source` 使用、保存审查证据、研究记录、跨仓契约、发布路线和源仓库治理决策的归档区域。 | 不随 CLI 分发;不等于产品实例的研发管理资产。 |
|
|
62
|
+
| 目标平台单文件二进制 | 随模板快照分发、只适用于一个受支持 OS/架构组合的可执行文件。 | 不等同于跨平台通用文件,也不等同于运行时下载或 `cargo install`。 |
|
|
63
|
+
| 原生模板实例运行时 | 在模板实例中执行原有治理和验证公共操作、且不依赖 Node.js 的目标平台原生运行时。 | 不等同于模板维护侧的构建工具,也不等同于仅创建模板的安装器。 |
|
|
60
64
|
| 仓库身份清单 | 显式声明仓库身份和清单结构版本的机器可读资产。 | 不承载项目名称、团队规模、Tracker 或其他易变业务配置。 |
|
|
61
65
|
|
|
62
66
|
只有在计划、分诊、调试或架构讨论中明确沉淀出稳定语言时,才新增术语。
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
| AntD CLI 校验证据 | `docs/.scratch/<feature>/design/<feature>-prototype-confirmation.md` 或评审记录 | 有 UI 时必需;记录 design.md / info / demo / token / semantic 查询 |
|
|
21
21
|
| 用户确认记录 | `docs/.scratch/<feature>/design/<feature>-prototype-confirmation.md` | 有 UI 时必需;未确认前不得进入 OpenAPI Draft 评审 |
|
|
22
22
|
| YSS 工程基线 | `.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md` | |
|
|
23
|
+
| YSS DTO wire profile | `.agents/skills/yss-dto/references/openapi-wire-profile.yaml`;`scripts/verify-yss-dto-openapi-profile` | |
|
|
23
24
|
|
|
24
25
|
## P0 追踪矩阵
|
|
25
26
|
|
|
@@ -41,6 +42,11 @@
|
|
|
41
42
|
| 页面动作覆盖 | 每个按钮 / 抽屉 / 弹窗动作有 endpoint/non-goal、`actionKey` 和错误码;Spec 明确认认证 / 授权变化时同时映射该行为 | | |
|
|
42
43
|
| 对象生命周期 | manage/maintain/configure/create/update/archive/retry/cancel/publish/export/create-draft 语义闭环 | | |
|
|
43
44
|
| YSS 响应包装 | 单对象 `SingleResult<T>`;列表 `MultiResult<T>`;分页 `PageResult<T>` | | |
|
|
45
|
+
| DTO wire shape | `com.yss.cloud.dto.result` 为新契约 canonical;`data` 落成 endpoint-specific schema,Java 泛型文字不得成为 OAS type / `$ref`;响应使用 `x-yss-response-wrapper`、`YssResultMeta` 和 `allOf` | | |
|
|
46
|
+
| 公共响应字段 | `success:boolean`;`dataType:string|null`;`code:string|integer|null`;`message/tips` 显式 nullable;不得把全局 `code` 放宽为 arbitrary object | | |
|
|
47
|
+
| 分页输入 | 只允许 `pageIndex/pageSize/orderBy/orderDirection/groupBy`;`orderDirection` 为 `ASC|DESC`;`orderBy/groupBy` 有 endpoint whitelist | | |
|
|
48
|
+
| 分页负向字段 | `offset`、`needTotalCount`、`tempTotalCount` 不得成为客户端输入;`totalPages` 仅在目标 mapper / fixture 证据存在时纳入 | | |
|
|
49
|
+
| Wire 证据 | mapper identity、代表性序列化 fixture、contract-test / 等价 HTTP 证据已记录;不能从 getter、Lombok 或 `@JsonIgnore` 直接推断 | | |
|
|
44
50
|
| 显式认证 / 授权行为 | 仅当 Spec 明确改变相关行为时,`401` / `403`、资源过滤和错误语义有契约表示 | | 未明确改变时不适用且无需额外记录 |
|
|
45
51
|
| 错误结构 | 模型级、字段级、行级错误可定位;关键 422 有 examples | | |
|
|
46
52
|
| 乐观锁 / 幂等 | 草稿写入有 draftVersion;关键命令有幂等键 | | |
|
|
@@ -38,6 +38,23 @@ const profiles = {
|
|
|
38
38
|
message: "OpenAPI YAML-first JSON handoff scenarios passed",
|
|
39
39
|
files: ["docs/api/templates/openapi-json-export-record-template.md", ".agents/skills/yss-api-integration/SKILL.md"],
|
|
40
40
|
markers: [[".agents/skills/yss-api-integration/SKILL.md", "SHA-256"]]
|
|
41
|
+
},
|
|
42
|
+
yssDtoWire: {
|
|
43
|
+
message: "YSS DTO OpenAPI wire-shape scenarios passed",
|
|
44
|
+
files: [
|
|
45
|
+
".agents/skills/yss-dto/references/openapi-wire-profile.yaml",
|
|
46
|
+
".agents/skills/yss-dto/SKILL.md",
|
|
47
|
+
".agents/skills/yss-openapi-governance/SKILL.md",
|
|
48
|
+
".agents/skills/yss-openapi-draft-review/SKILL.md",
|
|
49
|
+
"docs/api/templates/openapi-draft-review-checklist.md",
|
|
50
|
+
"scripts/verify-yss-dto-openapi-profile"
|
|
51
|
+
],
|
|
52
|
+
markers: [
|
|
53
|
+
[".agents/skills/yss-dto/SKILL.md", "x-yss-response-wrapper"],
|
|
54
|
+
[".agents/skills/yss-openapi-governance/SKILL.md", "verify-yss-dto-openapi-profile"],
|
|
55
|
+
[".agents/skills/yss-openapi-draft-review/SKILL.md", "offset`, `needTotalCount`, and `tempTotalCount"],
|
|
56
|
+
["docs/api/templates/openapi-draft-review-checklist.md", "DTO wire shape"]
|
|
57
|
+
]
|
|
41
58
|
}
|
|
42
59
|
};
|
|
43
60
|
|
|
@@ -50,5 +67,9 @@ export function runScenario(name) {
|
|
|
50
67
|
const result = spawnSync("scripts/verify-lifecycle-registry", [], { cwd: root, encoding: "utf8" });
|
|
51
68
|
ensure(result.status === 0, result.stderr || result.stdout);
|
|
52
69
|
}
|
|
70
|
+
if (name === "yssDtoWire") {
|
|
71
|
+
const result = spawnSync("scripts/verify-yss-dto-openapi-profile", [], { cwd: root, encoding: "utf8" });
|
|
72
|
+
ensure(result.status === 0, result.stderr || result.stdout);
|
|
73
|
+
}
|
|
53
74
|
process.stdout.write(`${profile.message}\n`);
|
|
54
75
|
}
|
|
@@ -8,7 +8,7 @@ export const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "
|
|
|
8
8
|
const SOURCE_ROOT = path.join(ROOT, ".agents/skills");
|
|
9
9
|
const LOCK_PATH = path.join(ROOT, "skills-lock.json");
|
|
10
10
|
const PROJECTION_ROOTS = [".claude/skills", ".codex/skills", ".hermes/skills", ".pi/skills", ".qoder/skills", ".trae/skills"];
|
|
11
|
-
const OBSOLETE = new Set(["to-" + "prd", "to-" + "issues", "design-an-interface", "qa", "request-refactor-plan", "ubiquitous-language", "edit-article", "obsidian-vault", "writing-great-skills", "code-review-process", "yss-domain-modeling", "yss-dir", "yss-duckdb", "yss-file", "yss-filerunner", "yss-mail", "yss-mapper-dynamic", "yss-quality", "yss-sql-condition", "yss-sql-tpl", "yss-openapi"]);
|
|
11
|
+
const OBSOLETE = new Set(["to-" + "prd", "to-" + "issues", "design-an-interface", "qa", "request-refactor-plan", "ubiquitous-language", "edit-article", "obsidian-vault", "writing-great-skills", "code-review-process", "yss-domain-modeling", "yss-dir", "yss-duckdb", "yss-file", "yss-filerunner", "yss-db2mybatis", "yss-mail", "yss-mapper-dynamic", "yss-quality", "yss-sql-condition", "yss-sql-tpl", "yss-valuation", "yss-variable", "yss-openapi"]);
|
|
12
12
|
|
|
13
13
|
function relative(target) { return path.relative(ROOT, target).replaceAll(path.sep, "/"); }
|
|
14
14
|
function entries(directory) { return existsSync(directory) ? readdirSync(directory, { withFileTypes: true }) : []; }
|
|
@@ -5,7 +5,7 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
5
5
|
cd "$ROOT_DIR"
|
|
6
6
|
node -e 'const [major]=process.versions.node.split(".").map(Number); if (major < 22 || major >= 27) { console.error("模板工具需要 Node >=22 <27"); process.exit(1); }'
|
|
7
7
|
|
|
8
|
-
required_files=(yss-project.yaml AGENTS.md CONTEXT.md skills-lock.json docs/process/lifecycle-registry.yaml docs/process/lifecycle-registry-baseline.json scripts/repository-mode scripts/implementation-path-policy scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/export-yss-skills)
|
|
8
|
+
required_files=(yss-project.yaml AGENTS.md CONTEXT.md skills-lock.json docs/process/lifecycle-registry.yaml docs/process/lifecycle-registry-baseline.json scripts/repository-mode scripts/implementation-path-policy scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-yss-dto-openapi-profile scripts/verify-yss-dto-openapi-scenarios scripts/export-yss-skills)
|
|
9
9
|
for required in "${required_files[@]}"; do test -f "$required" || { echo "缺少模板必需文件: $required" >&2; exit 1; }; done
|
|
10
10
|
|
|
11
11
|
repository_mode="$(scripts/repository-mode)"
|
|
@@ -18,6 +18,8 @@ fi
|
|
|
18
18
|
|
|
19
19
|
scripts/sync-skills --check
|
|
20
20
|
scripts/update-skill-lock --check
|
|
21
|
+
scripts/verify-yss-dto-openapi-profile
|
|
22
|
+
scripts/verify-yss-dto-openapi-scenarios
|
|
21
23
|
scripts/verify-lifecycle-registry
|
|
22
24
|
scripts/verify-lifecycle-scenarios
|
|
23
25
|
scripts/verify-governance-release
|
|
@@ -30,7 +32,7 @@ scripts/verify-yss-ui-scenarios
|
|
|
30
32
|
scripts/verify-openapi-yaml-first-scenarios
|
|
31
33
|
scripts/verify-openapi-json-handoff-scenarios
|
|
32
34
|
|
|
33
|
-
for entry in scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-lifecycle-scenarios scripts/verify-matt-yss-integration-scenarios scripts/verify-prototype-backend-scaffold-scenarios scripts/verify-yss-router-scenarios scripts/verify-openapi-yaml-first-scenarios scripts/verify-openapi-json-handoff-scenarios scripts/export-yss-skills; do node --check "$entry"; done
|
|
35
|
+
for entry in scripts/sync-skills scripts/update-skill-lock scripts/generate-lifecycle-artifacts scripts/verify-lifecycle-registry scripts/verify-yss-dto-openapi-profile scripts/verify-yss-dto-openapi-scenarios scripts/verify-lifecycle-scenarios scripts/verify-matt-yss-integration-scenarios scripts/verify-prototype-backend-scaffold-scenarios scripts/verify-yss-router-scenarios scripts/verify-openapi-yaml-first-scenarios scripts/verify-openapi-json-handoff-scenarios scripts/export-yss-skills; do node --check "$entry"; done
|
|
34
36
|
|
|
35
37
|
legacy_runtime="ru""by"
|
|
36
38
|
script_roots=(scripts)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { parseDocument } from "./vendor/yaml.mjs";
|
|
6
|
+
|
|
7
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
const profilePath = path.join(root, ".agents/skills/yss-dto/references/openapi-wire-profile.yaml");
|
|
9
|
+
|
|
10
|
+
function ensure(condition, message) {
|
|
11
|
+
if (!condition) throw new TypeError(message);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function sameMembers(actual, expected, label) {
|
|
15
|
+
ensure(Array.isArray(actual), `${label} 必须是数组`);
|
|
16
|
+
const left = [...actual].sort().join(",");
|
|
17
|
+
const right = [...expected].sort().join(",");
|
|
18
|
+
ensure(left === right, `${label} 必须为 [${expected.join(", ")}],实际为 [${actual.join(", ")}]`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function includesAll(actual, expected, label) {
|
|
22
|
+
ensure(Array.isArray(actual), `${label} 必须是数组`);
|
|
23
|
+
for (const value of expected) ensure(actual.includes(value), `${label} 缺少 ${value}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function checkField(field, label, { wireTypes, nullable, required, direction }) {
|
|
27
|
+
ensure(field && typeof field === "object", `${label} 必须是对象`);
|
|
28
|
+
if (direction) ensure(field.direction === direction, `${label}.direction 必须为 ${direction}`);
|
|
29
|
+
sameMembers(field.wire_types, wireTypes, `${label}.wire_types`);
|
|
30
|
+
ensure(field.nullable === nullable, `${label}.nullable 必须为 ${nullable}`);
|
|
31
|
+
ensure(field.required === required, `${label}.required 必须为 ${required}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function checkArrayData(field, label, direction) {
|
|
35
|
+
checkField(field, label, { wireTypes: ["array"], nullable: false, required: true, direction });
|
|
36
|
+
ensure(field.items === "endpoint-schema", `${label}.items 必须为 endpoint-schema`);
|
|
37
|
+
ensure(Array.isArray(field.empty_value) && field.empty_value.length === 0, `${label}.empty_value 必须为 []`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const document = parseDocument(readFileSync(profilePath, "utf8"), { maxAliasCount: 0 });
|
|
42
|
+
ensure(document && document.errors.length === 0, `wire profile YAML 无法解析: ${document?.errors?.map((error) => error.message).join("; ")}`);
|
|
43
|
+
const profile = document.toJSON();
|
|
44
|
+
|
|
45
|
+
ensure(profile.schema_version === 1, "wire profile schema_version 必须为 1");
|
|
46
|
+
ensure(profile.kind === "yss-dto-openapi-wire-profile", "wire profile kind 不正确");
|
|
47
|
+
ensure(profile.canonical?.java_package === "com.yss.cloud.dto.result", "canonical package 必须为 com.yss.cloud.dto.result");
|
|
48
|
+
ensure(profile.canonical?.type_parameter?.java_bound === "java.io.Serializable", "结果泛型必须声明 Serializable bound");
|
|
49
|
+
ensure(profile.canonical?.openapi?.response_meta_schema === "YssResultMeta", "OpenAPI 基础响应 schema 必须为 YssResultMeta");
|
|
50
|
+
ensure(profile.canonical?.openapi?.concrete_schema_composition === "allOf", "具体响应 schema 必须使用 allOf 组合");
|
|
51
|
+
ensure(profile.canonical?.openapi?.response_wrapper_extension === "x-yss-response-wrapper", "响应包装扩展字段不正确");
|
|
52
|
+
ensure(profile.canonical?.openapi?.literal_java_generic_schema === false, "不得把 Java 泛型文字作为 OpenAPI schema");
|
|
53
|
+
|
|
54
|
+
const compatibility = profile.compatibility_packages?.find((item) => item.java_package === "com.yss.cloud.dto.response");
|
|
55
|
+
ensure(compatibility?.use_for_new_contracts === false, "dto.response 必须标记为非新契约 canonical");
|
|
56
|
+
|
|
57
|
+
const commonFields = profile.common_response?.fields ?? {};
|
|
58
|
+
sameMembers(Object.keys(commonFields), ["success", "dataType", "code", "message", "tips"], "common response fields");
|
|
59
|
+
checkField(commonFields.success, "success", { wireTypes: ["boolean"], nullable: false, required: true, direction: "response" });
|
|
60
|
+
checkField(commonFields.dataType, "dataType", { wireTypes: ["string", "null"], nullable: true, required: true, direction: "response" });
|
|
61
|
+
checkField(commonFields.code, "code", { wireTypes: ["string", "integer", "null"], nullable: true, required: true, direction: "response" });
|
|
62
|
+
checkField(commonFields.message, "message", { wireTypes: ["string", "null"], nullable: true, required: true, direction: "response" });
|
|
63
|
+
checkField(commonFields.tips, "tips", { wireTypes: ["string", "null"], nullable: true, required: true, direction: "response" });
|
|
64
|
+
ensure(commonFields.code.policy === "do-not-widen-global-wrapper", "code 不得退化为全局 arbitrary object");
|
|
65
|
+
|
|
66
|
+
sameMembers(Object.keys(profile.wrappers ?? {}), ["SingleResult", "MultiResult", "PageResult"], "wrappers");
|
|
67
|
+
for (const name of ["SingleResult", "MultiResult", "PageResult"]) {
|
|
68
|
+
ensure(profile.wrappers[name].java_type.startsWith(`com.yss.cloud.dto.result.${name}<T>`), `${name} 必须来自 canonical result package`);
|
|
69
|
+
}
|
|
70
|
+
const singleData = profile.wrappers.SingleResult?.data;
|
|
71
|
+
ensure(singleData?.direction === "response", "SingleResult.data 必须为 response");
|
|
72
|
+
ensure(singleData?.wire_shape === "endpoint-schema-or-null", "SingleResult.data 必须绑定 endpoint schema 或 null");
|
|
73
|
+
ensure(singleData?.nullable === true && singleData?.required === true, "SingleResult.data 必须显式 required 且 nullable");
|
|
74
|
+
checkArrayData(profile.wrappers.MultiResult?.data, "MultiResult.data", "response");
|
|
75
|
+
const pageFields = profile.wrappers.PageResult?.fields ?? {};
|
|
76
|
+
sameMembers(Object.keys(pageFields), ["totalCount", "pageSize", "pageIndex", "data"], "PageResult.fields");
|
|
77
|
+
checkField(pageFields.totalCount, "PageResult.totalCount", { wireTypes: ["integer"], nullable: false, required: true, direction: "response" });
|
|
78
|
+
ensure(pageFields.totalCount.format === "int64" && pageFields.totalCount.minimum === 0, "PageResult.totalCount 必须为非负 int64");
|
|
79
|
+
checkField(pageFields.pageSize, "PageResult.pageSize", { wireTypes: ["integer"], nullable: false, required: true, direction: "response" });
|
|
80
|
+
ensure(pageFields.pageSize.format === "int32" && pageFields.pageSize.minimum === 1, "PageResult.pageSize 必须为正 int32");
|
|
81
|
+
checkField(pageFields.pageIndex, "PageResult.pageIndex", { wireTypes: ["integer"], nullable: false, required: true, direction: "response" });
|
|
82
|
+
ensure(pageFields.pageIndex.format === "int32" && pageFields.pageIndex.minimum === 1, "PageResult.pageIndex 必须为正 int32");
|
|
83
|
+
checkArrayData(pageFields.data, "PageResult.data", "response");
|
|
84
|
+
sameMembers(profile.page_query?.forbidden_client_fields, ["offset", "needTotalCount", "tempTotalCount"], "forbidden_client_fields");
|
|
85
|
+
ensure(profile.page_query?.request_direction === "query", "PageQuery 必须声明 query request direction");
|
|
86
|
+
const pageQueryFields = profile.page_query?.fields ?? {};
|
|
87
|
+
sameMembers(Object.keys(pageQueryFields), ["pageIndex", "pageSize", "orderBy", "orderDirection", "groupBy"], "PageQuery.fields");
|
|
88
|
+
checkField(pageQueryFields.pageIndex, "PageQuery.pageIndex", { wireTypes: ["integer"], nullable: false, required: false, direction: "request" });
|
|
89
|
+
ensure(pageQueryFields.pageIndex.format === "int32" && pageQueryFields.pageIndex.minimum === 1 && pageQueryFields.pageIndex.default === 1, "PageQuery.pageIndex 必须为正 int32,默认 1");
|
|
90
|
+
checkField(pageQueryFields.pageSize, "PageQuery.pageSize", { wireTypes: ["integer"], nullable: false, required: false, direction: "request" });
|
|
91
|
+
ensure(pageQueryFields.pageSize.format === "int32" && pageQueryFields.pageSize.minimum === 1 && pageQueryFields.pageSize.default === 10, "PageQuery.pageSize 必须为正 int32,默认 10");
|
|
92
|
+
checkField(pageQueryFields.orderBy, "PageQuery.orderBy", { wireTypes: ["string", "null"], nullable: true, required: false, direction: "request" });
|
|
93
|
+
ensure(pageQueryFields.orderBy.policy === "endpoint-whitelist-required", "PageQuery.orderBy 必须要求 endpoint whitelist");
|
|
94
|
+
sameMembers(profile.page_query?.fields?.orderDirection?.enum, ["ASC", "DESC"], "orderDirection.enum");
|
|
95
|
+
checkField(pageQueryFields.orderDirection, "PageQuery.orderDirection", { wireTypes: ["string"], nullable: false, required: false, direction: "request" });
|
|
96
|
+
ensure(pageQueryFields.orderDirection.default === "DESC", "PageQuery.orderDirection 默认值必须为 DESC");
|
|
97
|
+
checkField(pageQueryFields.groupBy, "PageQuery.groupBy", { wireTypes: ["string", "null"], nullable: true, required: false, direction: "request" });
|
|
98
|
+
ensure(pageQueryFields.groupBy.policy === "endpoint-whitelist-required", "PageQuery.groupBy 必须要求 endpoint whitelist");
|
|
99
|
+
ensure(profile.wrappers.PageResult.computed_fields.totalPages.policy === "include-only-with-target-wire-evidence", "totalPages 必须要求目标 wire evidence");
|
|
100
|
+
ensure(profile.wrappers.PageResult.computed_fields.totalPages.status === "mapper-dependent", "totalPages 必须标记为 mapper-dependent");
|
|
101
|
+
ensure(profile.page_query.computed_fields.offset.policy === "exclude-from-client-input", "offset 不得成为客户端输入");
|
|
102
|
+
ensure(profile.page_query.computed_fields.needTotalCount.policy === "exclude-from-client-input", "needTotalCount 不得成为客户端输入");
|
|
103
|
+
ensure(profile.page_query.computed_fields.tempTotalCount.policy === "exclude-from-client-input", "tempTotalCount 不得成为客户端输入");
|
|
104
|
+
includesAll(profile.wire_evidence?.required_before_freeze, ["target-http-mapper-identity", "representative-serialization-fixtures", "contract-test-or-equivalent-http-evidence"], "wire_evidence.required_before_freeze");
|
|
105
|
+
process.stdout.write("YSS DTO OpenAPI wire profile 验证通过\n");
|
|
106
|
+
} catch (error) {
|
|
107
|
+
process.stderr.write(`${error.message}\n`);
|
|
108
|
+
process.exitCode = 1;
|
|
109
|
+
}
|