Skip to content

add: JSON tags to all exported struct fields in wrapper packages#44

Merged
yamamoto-febc merged 1 commit into
mainfrom
feat/struct-tag
May 25, 2026
Merged

add: JSON tags to all exported struct fields in wrapper packages#44
yamamoto-febc merged 1 commit into
mainfrom
feat/struct-tag

Conversation

@yamamoto-febc

Copy link
Copy Markdown
Member

どのIssueを閉じますか?

issueなし

このPRはどういう変更を行いますか?

apis/ 下の全ラッパーパッケージで定義されている export 構造体に、JSON タグを追加しました。

  • apis/version: ExposedPort, EnvironmentVariable, CreateParams, VersionDetail
  • apis/application: ApplicationDetail, Placement
  • apis/cluster: CreateParams, UpdateParams, ClusterDetail
  • apis/certificate: CreateParams, UpdateParams
  • apis/loadbalancer: LoadBalancerInterface, NodeInterface, NodeInterfaceAddress, CreateParams, LoadBalancerDetail, LoadBalancerNodeDetail
  • apis/autoscalinggroup: NodeInterface, CreateParams, AutoScalingGroupDetail
  • apis/workernode: WorkerNodeDetail, WorkerNodeNetworkInterface

タグ名は ogen 生成の v1 型と同じ camelCase で統一しています。
ポインタ型・スライス型も含めて omitempty は付けていません。

これにより、ラッパー型を直接 JSON marshal/unmarshal する際にフィールド名が PascalCase になる問題が解消されます。

ドキュメントの変更は必要ですか?

不要

Signed-off-by: Kazumichi Yamamoto <yamamoto.febc@gmail.com>
@yamamoto-febc yamamoto-febc requested a review from a team May 25, 2026 02:14

@repeatedly repeatedly 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.

LGTM

@yamamoto-febc yamamoto-febc merged commit fc9acc2 into main May 25, 2026
10 checks passed
@yamamoto-febc yamamoto-febc deleted the feat/struct-tag branch May 25, 2026 04:19
@github-actions github-actions Bot mentioned this pull request May 25, 2026
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.

3 participants