Skip to content

Commit 70eafec

Browse files
committed
Update fastapi and move event examples in Body function
1 parent 0f003bb commit 70eafec

File tree

2 files changed

+40
-48
lines changed

2 files changed

+40
-48
lines changed

http_app/routes/events.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ async def event_schema_list() -> List[str]:
6767

6868
@router.post(
6969
"",
70-
openapi_extra={
71-
"requestBody": {
72-
"content": {
73-
"application/cloudevents+json; charset=UTF-8": {
74-
"examples": _event_schema_examples(),
75-
}
76-
},
77-
},
78-
},
7970
status_code=204,
8071
description="""
8172
Entrypoint for CloudEvent processing, it supports only single events.
@@ -86,6 +77,7 @@ async def event_schema_list() -> List[str]:
8677
async def submit_event(
8778
event_data: _EVENTS_UNION_TYPE = Body(
8879
media_type="application/cloudevents+json; charset=UTF-8",
80+
openapi_examples=_event_schema_examples(),
8981
discriminator="type",
9082
),
9183
content_type: typing.Literal[

poetry.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)