Skip to content

Commit 9b76bd8

Browse files
committed
update readme
1 parent 7be1b36 commit 9b76bd8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Mainly, Jeffy is focusing on three things.
4242
* 3.4. [S3 Client](#S3Client)
4343
* 4. [Encoding](#Encoding)
4444
* 5. [Validation](#Validation)
45-
* 5.1. [JSON Scheme Validator](#JSONSchemeValidator)
45+
* 5.1. [JSONSchemaValidator](#JSONSchemaValidator)
4646

4747
<!-- vscode-markdown-toc-config
4848
numbering=true
@@ -344,6 +344,8 @@ def handler(event, context):
344344
### 2.7. <a name='s3'></a>s3
345345
Decorator for S3 event. Automatically parse body stream from triggered S3 object and S3 bucket and key name to Lambda.
346346

347+
**This handler requires `s3:GetObject` permission.**
348+
347349
Default encoding is `jeffy.encoding.bytes.BytesEncoding`.
348350

349351
```python
@@ -354,7 +356,7 @@ app = get_app()
354356
def handler(event, context):
355357
event['key'] # S3 bucket key
356358
event['bucket_name'] # S3 bucket name
357-
event['body'] # object stream from triggered S3 object
359+
event['body'] # Bytes data of the object
358360
event['correlation_id'] # correlation_id
359361
event['metadata'] # object matadata
360362
```
@@ -376,6 +378,8 @@ Jeffy has the original wrapper clients of AWS SDK(boto3). The clients automatica
376378

377379
### 3.1. <a name='KinesisClinent'></a>Kinesis Clinent
378380

381+
Default encoding is `jeffy.encoding.json.JsonEncoding`.
382+
379383
```python
380384
from jeffy.framework import get_app
381385
from jeffy.sdk.kinesis import Kinesis
@@ -476,17 +480,17 @@ def handler(event, context):
476480

477481
## 5. <a name='Validation'></a>Validation
478482

479-
### 5.1. <a name='JSONSchemeValidator'></a>JSON Scheme Validator
480-
`JsonSchemeValidator` is automatically validate event payload with following json scheme you define. raise `ValidationError` exception if the validation fails.
483+
### 5.1. <a name='JSONSchemaValidator'></a>JSONSchemaValidator
484+
`JsonSchemaValidator` is automatically validate event payload with following json schema you define. raise `ValidationError` exception if the validation fails.
481485

482486
```python
483487
from jeffy.framework import get_app
484-
from jeffy.validator.jsonscheme import JsonSchemeValidator
488+
from jeffy.validator.jsonschema import JsonSchemaValidator
485489

486490
app = get_app()
487491

488492
@app.handlers.rest_api(
489-
validator=JsonSchemeValidator(scheme={
493+
validator=JsonSchemaValidator(schema={
490494
'type': 'object',
491495
'properties': {
492496
'message': {'type': 'string'}}}))

0 commit comments

Comments
 (0)