Skip to content

Conversation

@codijk
Copy link
Contributor

@codijk codijk commented Dec 18, 2025

Pull Request

Description

Ensures consistent schema output across OpenAPI versions when AdditionalPropertiesAllowed is false.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Related Issue(s)

Fixes #2646

Changes Made

  • Updates serialization logic to emit additionalProperties: false for all OpenAPI versions when AdditionalPropertiesAllowed is false.
  • Refactors related test to a theory and verifies behavior for both OpenAPI 3.0 and 3.1.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All existing tests pass

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Versions applicability

  • My change applies to the version 1.X of the library, if so PR link:
  • My change applies to the version 2.X of the library, if so PR link:
  • My change applies to the version 3.X of the library, if so PR link:
  • I have evaluated the applicability of my change against the other versions above.

See the contributing guidelines for more information about how patches are applied across multiple versions.

Additional Notes

* Updates serialization logic to emit `additionalProperties: false` for all OpenAPI versions when `AdditionalPropertiesAllowed` is false.
* Refactors related test to a theory and verifies behavior for both OpenAPI 3.0 and 3.1.
* Ensures consistent schema output across OpenAPI versions.
@codijk codijk requested a review from a team as a code owner December 18, 2025 09:09
@codijk
Copy link
Contributor Author

codijk commented Dec 18, 2025

@microsoft-github-policy-service agree company="InSpark"

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution

@baywet baywet enabled auto-merge December 18, 2025 11:32
@baywet baywet merged commit 6651c36 into microsoft:support/v2 Dec 18, 2025
8 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