File tree 2 files changed +3
-9
lines changed
aws_lambda_powertools/event_handler
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -1466,13 +1466,13 @@ def get_openapi_schema(
1466
1466
"You are using Pydantic v2, which is incompatible with OpenAPI schema 3.0. Forcing OpenAPI 3.1" ,
1467
1467
stacklevel = 2 ,
1468
1468
)
1469
- openapi_version = DEFAULT_OPENAPI_VERSION
1469
+ openapi_version = "3.1.0"
1470
1470
elif not PYDANTIC_V2 and not openapi_version .startswith ("3.0" ):
1471
1471
warnings .warn (
1472
1472
"You are using Pydantic v1, which is incompatible with OpenAPI schema 3.1. Forcing OpenAPI 3.0" ,
1473
1473
stacklevel = 2 ,
1474
1474
)
1475
- openapi_version = DEFAULT_OPENAPI_VERSION
1475
+ openapi_version = "3.0.3"
1476
1476
1477
1477
# Start with the bare minimum required for a valid OpenAPI schema
1478
1478
info : Dict [str , Any ] = {"title" : title , "version" : version }
Original file line number Diff line number Diff line change 1
- from aws_lambda_powertools .event_handler .openapi .pydantic_loader import PYDANTIC_V2
2
-
3
1
DEFAULT_API_VERSION = "1.0.0"
4
-
5
- if PYDANTIC_V2 :
6
- DEFAULT_OPENAPI_VERSION = "3.1.0"
7
- else :
8
- DEFAULT_OPENAPI_VERSION = "3.0.3"
2
+ DEFAULT_OPENAPI_VERSION = "3.0.0"
You can’t perform that action at this time.
0 commit comments