Skip to content

Disable disallowAdditionalPropertiesIfNotPresent in OpenAPI generator#7

Merged
Bucknalla merged 1 commit intomainfrom
alex-disable-disallow-additional-properties
Mar 14, 2026
Merged

Disable disallowAdditionalPropertiesIfNotPresent in OpenAPI generator#7
Bucknalla merged 1 commit intomainfrom
alex-disable-disallow-additional-properties

Conversation

@Bucknalla
Copy link
Copy Markdown
Collaborator

@Bucknalla Bucknalla commented Mar 14, 2026

Summary

  • Adds -p disallowAdditionalPropertiesIfNotPresent=false to the OpenAPI generator invocation in scripts.sh
  • Generated Go models will now accept unknown JSON fields via AdditionalProperties map[string]interface{}, preventing deserialization failures when the Notehub team adds new API fields before the spec is updated

Test plan

  • Run ./scripts.sh generate_and_format and verify models include AdditionalProperties field
  • Confirm generated code compiles with go build ./...
  • Verify unknown JSON fields are captured rather than silently dropped

🤖 Generated with Claude Code

…erator

Allow generated Go models to accept unknown fields so that new API
properties added by the Notehub team don't break deserialization when
the spec hasn't been updated yet.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Bucknalla Bucknalla merged commit 81947dd into main Mar 14, 2026
1 check 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.

1 participant