Skip to content

Commit 6fa82b6

Browse files
committed
updated AWS Lambda swagger version
1 parent da98afd commit 6fa82b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lambda_func/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def rate_limit_exceeded_handler(request: Request, exc: RateLimitExceeded):
6363

6464
def get_application() -> FastAPI:
6565
application = FastAPI(responses={429: {'model': ErrorRs}, 400: {'model': ErrorRs}}, exception_handlers={429: rate_limit_exceeded_handler},
66-
title="Encryptor", description="Encrypt plain text using simple encryption *i.e*: ***Caesar***, ***Morse***, etc.", version="0.1.0")
66+
title="Encryptor", description="Encrypt plain text using simple encryption *i.e*: ***Caesar***, ***Morse***, etc.", version="1.0.3")
6767
return application
6868

6969

lambda_func/main_minified.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class EncryptRs(BaseModel):cypherText:str
5454
class Detail(BaseModel):msg:str
5555
class ErrorRs(BaseModel):detail:List[Detail]
5656
async def rate_limit_exceeded_handler(request:Request,exc:RateLimitExceeded):A=[];A.append({_E:f"Rate limit exceeded: {exc.detail} Try again in a while..."});B={'detail':A};return JSONResponse(status_code=status.HTTP_429_TOO_MANY_REQUESTS,content=B)
57-
def get_application()->FastAPI:B='model';A=FastAPI(responses={429:{B:ErrorRs},400:{B:ErrorRs}},exception_handlers={429:rate_limit_exceeded_handler},title='Encryptor',description='Encrypt plain text using simple encryption *i.e*: ***Caesar***, ***Morse***, etc.',version='0.1.0');return A
57+
def get_application()->FastAPI:B='model';A=FastAPI(responses={429:{B:ErrorRs},400:{B:ErrorRs}},exception_handlers={429:rate_limit_exceeded_handler},title='Encryptor',description='Encrypt plain text using simple encryption *i.e*: ***Caesar***, ***Morse***, etc.',version='1.0.3');return A
5858
app=get_application()
5959
LIMIT='5/minute'
6060
handler=Mangum(app)

0 commit comments

Comments
 (0)