You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a collection of issues and improvements that we need to make to this library.
Documentation
🔴 Add documentation regarding all schema types and their usage.
🔴 Document any polyfills needed by the library.
Also, update the package Readme to show the package's goals and objectives.
Features
Some new schema types and other features that we'll probably need later:
🔴 Instance of: check whether the value is an instance of a class. This is blocking the validation of FileWrapper arguments in the SDKs at the moment.
Qualifier such as min, max, and probably others. We should look at the OpenAPI and see what cases might occur.
Design
➕ Schema can be redesigned or new schema types created so that the XML-handling code is separated from the schema types. This is important for reducing the size of exported code that only uses this library for JSON mapping and validation which is going to be the majority of the library users.
Tests
That for each type is quite repetitive. Test code can be significantly reduced by using Jest "each" runner.
Some tests are repeated across types.
Tests are missing for certain branches.
Tests missing for complex cases. Need integration tests that compose and test schema.
Validation Messages
Error messages can use improvements such as:
Report errors found inside property, array elements, or part of other complex types with reference to the complex type.
Show errors visually pointed out in the object, dictionary, and array values.
Literal can use a simpler error message.
XML related errors can show XML formatted data.
TypeScript Typing
🔴 Object schema is hard to extend using "extends" schema when the user is trying to explicitly type the object schema using the "Schema" type. Change "ObjectSchema" to use friendly generic-types. Object inheritance and discriminator work is blocked due to this.
Complex schema code skips type-checking in a lot of places by using "any".
Review object, dictionary, defaults, discriminator and extends schema types.
Let's attempt to write code with 100% type coverage.
Code Quality
Setup code coverage metrics.
➕ Discriminator schema requires a review.
Code is verbose in schema. For example, nullable and optional are almost the same except for the types. See if we can avoid this repetition.
The content you are editing has changed. Please copy your edits and refresh the page.
This is a collection of issues and improvements that we need to make to this library.
Documentation
Features
Some new schema types and other features that we'll probably need later:
Design
Tests
Validation Messages
Error messages can use improvements such as:
TypeScript Typing
Code Quality
Tasks
The text was updated successfully, but these errors were encountered: