Skip to content

Commit 8573c28

Browse files
fix(event-handler): set default OpenAPI version to 3.0.0 (#3527)
Co-authored-by: Leandro Damascena <[email protected]>
1 parent cacadd3 commit 8573c28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ def get_openapi_schema(
13751375
The title of the application.
13761376
version: str
13771377
The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API
1378-
openapi_version: str, default = "3.1.0"
1378+
openapi_version: str, default = "3.0.0"
13791379
The version of the OpenAPI Specification (which the document uses).
13801380
summary: str, optional
13811381
A short summary of what the application does.
@@ -1497,7 +1497,7 @@ def get_openapi_json_schema(
14971497
The title of the application.
14981498
version: str
14991499
The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API
1500-
openapi_version: str, default = "3.1.0"
1500+
openapi_version: str, default = "3.0.0"
15011501
The version of the OpenAPI Specification (which the document uses).
15021502
summary: str, optional
15031503
A short summary of what the application does.
@@ -1567,7 +1567,7 @@ def enable_swagger(
15671567
The title of the application.
15681568
version: str
15691569
The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API
1570-
openapi_version: str, default = "3.1.0"
1570+
openapi_version: str, default = "3.0.0"
15711571
The version of the OpenAPI Specification (which the document uses).
15721572
summary: str, optional
15731573
A short summary of what the application does.

aws_lambda_powertools/event_handler/openapi/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class Schema(BaseModel):
207207
readOnly: Optional[bool] = None
208208
writeOnly: Optional[bool] = None
209209
examples: Optional[List["Example"]] = None
210-
# Ref: OpenAPI 3.1.0: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object
210+
# Ref: OpenAPI 3.0.0: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#schema-object
211211
# Schema Object
212212
discriminator: Optional[Discriminator] = None
213213
xml: Optional[XML] = None

0 commit comments

Comments
 (0)