Skip to content

Conversation

@mnahkies
Copy link
Owner

@mnahkies mnahkies commented Nov 29, 2025

  • add support for exclusiveMaximum / exclusiveMinimum on numbers being provided as booleans, for backwards compatibility with earlier json schema definitions
  • solve remaining instances of double normalization and enforce that schema normalization only happens once, allowing for safe divergence of the domain models
  • split the Input class to make easier to directly test
  • begin back-filling tests on the IR generation (previously only tested indirectly)

mnahkies added a commit that referenced this pull request Nov 30, 2025
adds a couple of missing unit tests, split from #386
mnahkies added a commit that referenced this pull request Nov 30, 2025
@mnahkies mnahkies force-pushed the mn/test/boost-unit-test-coverage branch from 7e3a1cb to 3dafb23 Compare November 30, 2025 15:59
mnahkies added a commit that referenced this pull request Nov 30, 2025
adds direct unit tests for input schema normalization, covering most
branches.

this will facilitate several improvements / bug fixes in subsequent
changes, split from #386
@mnahkies mnahkies force-pushed the mn/test/boost-unit-test-coverage branch from 3dafb23 to 46b988f Compare November 30, 2025 16:45
@mnahkies mnahkies changed the base branch from main to mn/fix/always-extract-request-bodies November 30, 2025 16:46
mnahkies added a commit that referenced this pull request Nov 30, 2025
as written, these tests are using `Schema` types not normalized
`IRModel` types for the input.

this needs correcting before `Schema` and `IRModel` begin to diverge,
split from #386
@mnahkies mnahkies force-pushed the mn/fix/always-extract-request-bodies branch from bb5ba1b to d8bd80f Compare November 30, 2025 17:04
@mnahkies mnahkies force-pushed the mn/test/boost-unit-test-coverage branch from 46b988f to 8006639 Compare November 30, 2025 17:07
mnahkies added a commit that referenced this pull request Nov 30, 2025
wasn't causing issues yet, but will do once `IRModel` is no longer
compatible with `Schema`, split from #386
@mnahkies mnahkies force-pushed the mn/fix/always-extract-request-bodies branch from d8bd80f to f3e5caa Compare December 20, 2025 12:55
Base automatically changed from mn/fix/always-extract-request-bodies to main December 20, 2025 13:00
@mnahkies mnahkies force-pushed the mn/test/boost-unit-test-coverage branch from 8006639 to 8e4a7cd Compare December 20, 2025 13:39
}

export interface IRModelBase {
isIRModel: true
Copy link
Owner Author

Choose a reason for hiding this comment

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

Will probably later change this to be indicated through the type fields, undecided yet

@mnahkies mnahkies changed the title fix: handle boolean exclusiveMaximum / exclusiveMinimum, improve test coverage fix: handle boolean exclusiveMaximum / exclusiveMinimum Dec 20, 2025
schema(maybeRef: MaybeIRModel): IRModel {
if (isRef(maybeRef)) {
const schema = this.loader.schema(maybeRef)
return this.schemaNormalizer.isNormalized(schema)
Copy link
Owner Author

Choose a reason for hiding this comment

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

this check is needed because the virtual library currently ends up with a mixture of normalized and raw schemas 🤮 - but it's a pragmatic step forward for now

@mnahkies mnahkies enabled auto-merge (squash) December 20, 2025 14:03
@mnahkies mnahkies merged commit c5f7ef7 into main Dec 20, 2025
22 checks passed
@mnahkies mnahkies deleted the mn/test/boost-unit-test-coverage branch December 20, 2025 14:06
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