Skip to content

Comments

Get rid of disallow unknown fields in generated go models#32

Merged
shrinjay-opal merged 1 commit intoshrinjay/opal-13632-clean-unused-files-in-go-sdkfrom
shrinjay/opal-13633-get-rid-of-disallowunknownfileds-in-generated-go-models
Sep 18, 2025
Merged

Get rid of disallow unknown fields in generated go models#32
shrinjay-opal merged 1 commit intoshrinjay/opal-13632-clean-unused-files-in-go-sdkfrom
shrinjay/opal-13633-get-rid-of-disallowunknownfileds-in-generated-go-models

Conversation

@shrinjay-opal
Copy link
Collaborator

@shrinjay-opal shrinjay-opal commented Sep 18, 2025

This PR reconfigures the OpenAPI generator to not disallow unknown fields. What this does do - is add an AdditionalProperties struct to each model - which contains the fields returned by the API that do not belong in the OpenAPI type. This is actually something that people rely on for SubEvents - the fields go into AdditionalProperties.

You can see how this flag works in this github issue and the docs

@shrinjay-opal shrinjay-opal force-pushed the shrinjay/opal-13633-get-rid-of-disallowunknownfileds-in-generated-go-models branch 2 times, most recently from 6ff5d26 to bb43be6 Compare September 18, 2025 22:15
@shrinjay-opal shrinjay-opal force-pushed the shrinjay/opal-13633-get-rid-of-disallowunknownfileds-in-generated-go-models branch from bb43be6 to 9c4d8b2 Compare September 18, 2025 22:19
Copy link
Contributor

@andrewsy-opal andrewsy-opal left a comment

Choose a reason for hiding this comment

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

approved but nit: for big PRs with very little non autogen code, u should flag in the description what's not autogen

@shrinjay-opal shrinjay-opal merged commit 4dd4478 into shrinjay/opal-13632-clean-unused-files-in-go-sdk Sep 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants