skyleague / therefore

Therefore, the JSON Schema toolkit for TypeScript.
https://skyleague.io
MIT License
5 stars 1 forks source link

fix: add DefinedError reference in RestClientBuilder #157

Closed pevisscher closed 2 months ago

pevisscher commented 2 months ago

This pull request updates the RestClientBuilder class to improve type safety and error handling. The changes include:

  1. Added a reference to DefinedError from Ajv symbols in the EitherHelper class.
  2. Updated the Left interface to use the referenced DefinedError type for validationErrors.
  3. Modified the writeValidateRequestBody method to accept a reference parameter, allowing for proper type referencing.
  4. Updated the validateRequestBody method signature to use the referenced DefinedError type in its generic constraint.

These changes enhance the type safety of the REST client, particularly when dealing with validation errors and request body parsing.

pevisscher commented 2 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @pevisscher and the rest of your teammates on Graphite Graphite

github-actions[bot] commented 2 months ago

:tada: This PR is included in version 5.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: