Skip to content

feat!: extract anonymous structs into types#131

Draft
jamietanna wants to merge 2 commits into
chore/bump-oapifrom
chore/no-struct
Draft

feat!: extract anonymous structs into types#131
jamietanna wants to merge 2 commits into
chore/bump-oapifrom
chore/no-struct

Conversation

@jamietanna

@jamietanna jamietanna commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

As noted in PRF-1954, this long-time issue in oapi-codegen upstream
has led to cases where we would have an anonymous struct generated,
which can make it hard to interact with these types.

We can utilise the new generate-types-for-anonymous-schemas
functionality to introduce the explicit types.

This is a breaking change, as it may require users to handle a one-time
migration, but leads to a much more consistent and usable interface.

So we can generate examples, too.
As noted in PRF-1954, this long-time issue in `oapi-codegen` upstream
has led to cases where we would have an anonymous struct generated,
which can make it hard to interact with these types.

We can utilise the new `generate-types-for-anonymous-schemas`
functionality to introduce the explicit types.

This is a breaking change, as it may require users to handle a one-time
migration, but leads to a much more consistent and usable interface.
@jamietanna jamietanna changed the title sq feat!: extract anonymous structs into types Jun 26, 2026
@jamietanna jamietanna added the enhancement New feature or request label Jun 26, 2026

@kwent kwent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as long as SemVer correctly with good changelog and why it's breaking i don't have any issues

@jamietanna

Copy link
Copy Markdown
Collaborator Author

good changelog

Would you be hoping for a full list of types that are impacted? (we should be able to generate this from the Abstract Syntax Tree, I wonder if we can help folks migrate automagically too)

kwent commented Jul 11, 2026

Copy link
Copy Markdown
Member

the more the better always yes good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants