<commit_before># lambda-forest
*A set of tools to ease REST AWS Lambda Functions*

## About Lambda Forest
Lambda Forest is a microframework that provides a set of tools to make it easier to develop rest api's using the aws lambda function and api gateway. Lambda Forest attempts to make the develpment faster by easing common tasks, such as:

 - Exception handling
 - Request body deserialization
 - Response body serialization
 - Request validation
 
## Before you begin

In order to use Lambda Forest the AWS API Gateway needs to be configured to use Proxy Integration.

A detailed documentation can be found [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html).

## Getting Started

The recommended way to use Lambda Forest is to consume it from Maven. To add the lastest version of Lambda Forest in your project declare the following dependency in your *pom.xml* file:
```
<dependency>
    <groupId>br.com.tdsis</groupId>
    <artifactId>lambda-forest</artifactId>
    <version>0.0.1</version>
</dependency>
```

### Handling Requests

The Lambda Forest framework provides an abstract base class called AbstratRequestHandler that handles a Lambda execution call and perform some operations such as request body deserialization, request validation, response body serialization and exception handling.

#### POST / PUT / PATCH
```java
public class PostHandler extends AbstractRequestHandler<UserRequest, UserResponse> {

    @Override
    public void before(Context context) throws HttpException {
        addResponseHeader("Access-Control-Allow-Origin", "*");
    }
    
    @Override
    public UserResponse execute(UserRequest input, Context context) throws HttpException {
        UserResponse response = new UserResponse();
        response.setId(UUID.randomUUID().toString());<commit_msg>readme.md update<commit_after># lambda-forest
*A set of tools to ease REST AWS Lambda Functions*

## About Lambda Forest
Lambda Forest is a microframework that provides a set of tools to make it easier to develop rest api's using the aws lambda function and api gateway. Lambda Forest attempts to make the develpment faster by easing common tasks, such as:

 - Exception handling
 - Request body deserialization
 - Response body serialization
 - Request validation
 
## Before you begin

In order to use Lambda Forest the AWS API Gateway needs to be configured to use Proxy Integration.

A detailed documentation can be found [here](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html).

## Getting Started

The recommended way to use Lambda Forest is to consume it from Maven. To add the lastest version of Lambda Forest in your project declare the following dependency in your *pom.xml* file:

```xml
<dependency>
    <groupId>br.com.tdsis</groupId>
    <artifactId>lambda-forest</artifactId>
    <version>0.0.1</version>
</dependency>
```

### Handling Requests

The Lambda Forest framework provides an abstract base class called AbstratRequestHandler that handles a Lambda execution call and perform some operations such as request body deserialization, request validation, response body serialization and exception handling.

#### POST / PUT / PATCH
```java
public class PostHandler extends AbstractRequestHandler<UserRequest, UserResponse> {

    @Override
    public void before(Context context) throws HttpException {
        addResponseHeader("Access-Control-Allow-Origin", "*");
    }
    
    @Override
    public UserResponse execute(UserRequest input, Context context) throws HttpException {
        UserResponse response = new UserResponse();
        response.setId(UUID.randomUUID().toString());
{'fraction_non_alphanumeric': 0.07264380232244126, 'fraction_numerical': 0.0016203078584931137, 'mean_word_length': 4.431085043988269, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5842775', 'n_tokens_mistral': 957, 'n_tokens_neox': 918, 'n_words': 403}