Comments (3)
Hi snoozbuster,
I agree. For the example above, we would expect
{
"someList": [
{ "a": 1 },
{ "b": "schfifty-five" },
{ "c": "foo" }
]
}
The other issue you mention is, that the schema from new Draft07(listSchemaWithDefault).getSchema().properties.someList.default
is modified and every item contains an a
property?
I will look into it!
from json-schema-library.
Testing this, this issue has been already fixed in the upcoming version 8, which can currently be installed using [email protected]
. I working towards a full v8 release in the next weeks. If you go for this package, be aware of the breaking changes:
- Renamed JSON to Json in exported names, mainly:
JSONError
toJsonError
andJSONSchema
toJsonSchema
getTemplate
only adds required properties. Can be changed by settingaddOptionalProps:true
References
- branch: https://github.com/sagold/json-schema-library/tree/develop
- test: https://github.com/sagold/json-schema-library/blob/develop/test/unit/issues/issue38.getTemplate.anyOf.test.ts
- testresult: https://github.com/sagold/json-schema-library/runs/14708670439#r0s0
from json-schema-library.
[email protected]
has been released to npm and includes a fix for this issue.
from json-schema-library.
Related Issues (20)
- Clearly document how remote schemas are identified HOT 3
- ESM-Bundle for using in browser HOT 1
- getTemplate loses compiled references HOT 2
- getTemplate falsely returns default for type number when schema type is set to integer HOT 2
- Top level "oneOf" does not validate correctly HOT 2
- Support for future JSON Schema Drafts / Specifications HOT 3
- Cannot be used in browser-based applications that set a CSP which disallows unsafe-eval HOT 4
- multipleOf running into floating point issue HOT 10
- Wrongful Error on chained negative logic If cases HOT 4
- Support for `idn-email` fromat in Draft07 HOT 1
- The purpose of minLengthOneError HOT 2
- `patternProperties` schemas cause `getSchema` to mangle subsequent pointers HOT 2
- Request for Full ESM Support and Enabling "type: module" HOT 14
- Mutiple typeIds [not, oneOf] matched in subschema HOT 1
- Remove additional properties HOT 1
- Date Error Typo HOT 2
- "export 'default' (imported as 'deepmerge') was not found in 'deepmerge'
- MinItemsError rendering incorrectly HOT 2
- Array values mutated during validate when allOf exists HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-schema-library.