Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

go schema generator fails when generating formatted string fields

Open
#312 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli, tooling

Research direction

Reproduce the issue by placing the shown XRD in apis/my-yrd/definition.yaml and running crossplane project build. Inspect the Go schema generator and its generated schema output for the formatted email array field. Done means the generated files compile, include the required runtime import, and handle the generated Email type's DeepCopyInto requirement.

Written by the indexing model from the issue text.

Description

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
Dominant language
Go
Stars
19
Forks
31
Avg merge
2d 15h
Merged PRs (30d)
53

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from crossplane/cli

All issues in crossplane/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.