Skip to content

Fix schema gathering oversight#2219

Merged
mromaszewicz merged 1 commit intooapi-codegen:mainfrom
mromaszewicz:fix/schema-gathering-oversight
Feb 15, 2026
Merged

Fix schema gathering oversight#2219
mromaszewicz merged 1 commit intooapi-codegen:mainfrom
mromaszewicz:fix/schema-gathering-oversight

Conversation

@mromaszewicz
Copy link
Copy Markdown
Member

Response and RequestBodies need to include any additional types into model generation. This is an ancient bug, from the very first days of oapi-codegen.

Extend the issue-200 spec with inline objects containing additionalProperties inside components/responses and components/requestBodies. The test confirms the codegen produces named types (Bar_Pagination, Bar_Metadata) for these inline schemas.

Response and RequestBodies need to include any additional types
into model generation. This is an ancient bug, from the very
first days of oapi-codegen.

Extend the issue-200 spec with inline objects containing
additionalProperties inside components/responses and
components/requestBodies. The test confirms the codegen produces
named types (Bar_Pagination, Bar_Metadata) for these inline schemas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mromaszewicz mromaszewicz requested a review from a team as a code owner February 13, 2026 16:54
Copy link
Copy Markdown
Member

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

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

We really need a custom linting rule to catch all the places we've missed the AdditionalTypes... needing to be added 🫣

@jamietanna jamietanna added this to the v2.6.0 milestone Feb 15, 2026
@mromaszewicz mromaszewicz merged commit fca3f0f into oapi-codegen:main Feb 15, 2026
26 checks passed
@jamietanna jamietanna added the bug Something isn't working label Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants