instanceof
support for ProblemDetail factories- Unit testing
- NPM badge
- unit test coverage badge + GitHub action reporting coverage
- Fresh rebuild
ProblemDetails.create(data)
attributedata
must not contain anymore ansuccess
value. It's instead auto generated.
ProblemDetails.create(data)
attributedata
must not contain anymore aninstance
value. It's instead auto generated.
- Library now has a logo
- Minor changes in docs
- Some package.json metadata
- Removed
TITLE
generic type from ProblemDetails. - Added ResponseEnvelopes code
- success envelopes
- generic envelopes (either success or problem detail)
- checker functions
- create function
- docs
data
field for payload is now namedpayload
to be more explicit.- Renamed all generic types
DATA
toPAYLOAD
.
- Keywords and description in package.json.
- Dropped helper class
ProblemDetailClazz
. isInstance
is nowisOne
and just checks for the schema.- New: Method
ProblemDetails.create(data)
allows to create a typedProblemDetail
object with inferred types from thedata
parameter.
- Updated package.json to include repository URL.
- Custom
generator
option.- Allows to change the data to be passed to a ProblemDetail factory function.
- The
generator
can then translate the custom data todetail
and/ordata
.
- If ProblemDetail
DATA
type isundefined
- the
data
attribute of the ProblemDetail factory function can be omitted - or even the complete factory function argument.
- the
- Support for both CommonJS and ESM.
- Initial release.