go schema generator fails when generating formatted string fields
まだ誰も着手していません。
評価
調査の方向性
示されている XRD を apis/my-yrd/definition.yaml に配置し、crossplane project build を実行して問題を再現します。フォーマットされたメール配列フィールドについて、Go スキーマジェネレーターと生成されたスキーマ出力を調査します。生成されたファイルがコンパイルでき、必要な runtime インポートを含み、生成された Email 型の DeepCopyInto 要件に対応できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened?
My XRD Shema defines an email formatted string arrayfield.
This field is generated as *[]openapi_types.Email
Using this formats, the generated schema files will not compile due to 2 issues.
- the import
openapi_types "github.com/oapi-codegen/runtime/types"is missing - the openapi_types.Email does not implement the
DeepCopyIntofunc
How can we reproduce it?
Create a XRD defining a string array field with format email.
members:
type: array
description: Member principal namees for the group
items:
type: string
format: email
pattern: '^[^@\s]+@[^@\s]+\.[^@\s]+$'
Put the XRD into apis/my-yrd/definition.yaml
Run crossplane project build
What environment did it happen in?
- Crossplane CLI version: v2.5.0
- Platform (e.g., linux/amd64): linux/amd64
- Crossplane version (if applicable): not relevant
- 主要言語
- Go
- スター
- 19
- フォーク
- 31
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 53
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
crossplane/cli のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
crossplane/cli#282 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
crossplane/cli#384 ·
-
crossplane/cli#379 · 担当者 1 名 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
crossplane/cli#370 · リアクション 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
crossplane/cli#369 ·
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Bob Shell support オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
santhosh-tekuri/jsonschema#276 ·