-
Notifications
You must be signed in to change notification settings - Fork 5
fix: handle boolean exclusiveMaximum / exclusiveMinimum #386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
adds a couple of missing unit tests, split from #386
no behavior changes yet, split from #386
7e3a1cb to
3dafb23
Compare
adds direct unit tests for input schema normalization, covering most branches. this will facilitate several improvements / bug fixes in subsequent changes, split from #386
3dafb23 to
46b988f
Compare
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
bb5ba1b to
d8bd80f
Compare
46b988f to
8006639
Compare
wasn't causing issues yet, but will do once `IRModel` is no longer compatible with `Schema`, split from #386
d8bd80f to
f3e5caa
Compare
8006639 to
8e4a7cd
Compare
| } | ||
|
|
||
| export interface IRModelBase { | ||
| isIRModel: true |
There was a problem hiding this comment.
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
| schema(maybeRef: MaybeIRModel): IRModel { | ||
| if (isRef(maybeRef)) { | ||
| const schema = this.loader.schema(maybeRef) | ||
| return this.schemaNormalizer.isNormalized(schema) |
There was a problem hiding this comment.
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
exclusiveMaximum/exclusiveMinimumon numbers being provided asbooleans, for backwards compatibility with earlier json schema definitionssplit theInputclass to make easier to directly testbegin back-filling tests on the IR generation (previously only tested indirectly)