Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

go schema generator fails when generating formatted string fields

オープン
#312 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli, tooling

調査の方向性

示されている XRD を apis/my-yrd/definition.yaml に配置し、crossplane project build を実行して問題を再現します。フォーマットされたメール配列フィールドについて、Go スキーマジェネレーターと生成されたスキーマ出力を調査します。生成されたファイルがコンパイルでき、必要な runtime インポートを含み、生成された Email 型の DeepCopyInto 要件に対応できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
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.

  1. the import openapi_types "github.com/oapi-codegen/runtime/types" is missing
  2. the openapi_types.Email does not implement the DeepCopyInto func
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

crossplane/cli のほかの issue

crossplane/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。