Buckets:
ktongue/docker_container / .cache /opencode /node_modules /fast-json-stringify /test /issue-479.test.js
| const { test } = require('node:test') | |
| const build = require('..') | |
| test('should validate anyOf after allOf merge', (t) => { | |
| t.plan(1) | |
| const schema = { | |
| $id: 'schema', | |
| type: 'object', | |
| allOf: [ | |
| { | |
| $id: 'base', | |
| type: 'object', | |
| properties: { | |
| name: { | |
| type: 'string' | |
| } | |
| }, | |
| required: [ | |
| 'name' | |
| ] | |
| }, | |
| { | |
| $id: 'inner_schema', | |
| type: 'object', | |
| properties: { | |
| union: { | |
| $id: '#id', | |
| anyOf: [ | |
| { | |
| $id: 'guid', | |
| type: 'string' | |
| }, | |
| { | |
| $id: 'email', | |
| type: 'string' | |
| } | |
| ] | |
| } | |
| }, | |
| required: [ | |
| 'union' | |
| ] | |
| } | |
| ] | |
| } | |
| const stringify = build(schema) | |
| t.assert.equal( | |
| stringify({ name: 'foo', union: 'a8f1cc50-5530-5c62-9109-5ba9589a6ae1' }), | |
| '{"name":"foo","union":"a8f1cc50-5530-5c62-9109-5ba9589a6ae1"}') | |
| }) | |
Xet Storage Details
- Size:
- 1.06 kB
- Xet hash:
- 13c10685f010bc513fde2611636eb50f83fe06d75189c85e68d77bfae5afa108
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.