Skip to content

Releases: gridsmartercities/aws-lambda-decorators

Decoder Caching

01 Oct 06:35
e1e7dc8

Choose a tag to compare

  • json and jwt decoders are now caching. Extracting multiple parameters from the same json/jwt property will only decode from json/jwt once.
  • bug fix on Mandatory checks. Empty values are also checked.

Fixed calling mandatory validation statically

27 Sep 09:11
f781fdf

Choose a tag to compare

  • Mandatory validators can be used statically

Min and Max Length validators

26 Sep 13:12
4d6fcef

Choose a tag to compare

  • Added MinLength and MaxLength validators
  • Added ability to pass custom error messages to validators

Extract decorators can group errors

24 Sep 13:36
2002de2

Choose a tag to compare

  • extract_from_event and extract_from_context can now group errors

Grouping Validation Errors

23 Sep 13:48
7bce42f

Choose a tag to compare

  • Added group_errors flag to both extract and validate decorators. By setting this flag to True, all errors for all parameters will be grouped together and returned as a list of key/value objects, where the key is the name of the validated property, and the value is a list of all the errors found when validating that parameter.
  • Regular Expression validators do a full match now instead of a search.

New validators

20 Sep 06:38
2030841

Choose a tag to compare

  • Added Maximum Value validator
  • Added Minimum Value validator

Moved examples to its own repo

25 Jul 07:09
0f680bf

Choose a tag to compare

Examples have been moved to https://github.com/gridsmartercities/aws-lambda-decorators-examples, so new test.pypi releases can be tested against that repo easily.

Schema Validator

28 May 14:03
0d8c354

Choose a tag to compare

  • Added schema validator. Check out SchemaValidator here

CORS

23 May 12:33

Choose a tag to compare

Added cors decorator, which can add cors headers to the response of the decorated function (lambda)

Handle All Exceptions Decorator

14 May 13:52
7b5f173

Choose a tag to compare

  • Added the handle_all_exceptions decorator that is able to catch any type of exception and return a 400 message back.
  • Made the Exception friendly message optional in the handle_exceptions decorator.