diff --git a/readalongs/web_api.py b/readalongs/web_api.py index 6aef947e..30ff8126 100644 --- a/readalongs/web_api.py +++ b/readalongs/web_api.py @@ -145,28 +145,26 @@ async def langs() -> List[SupportedLanguage]: @v1.post("/assemble", response_model=AssembleResponse) async def assemble( request: AssembleRequest = Body( - examples=[ - { - "text": { - "summary": "A basic example with plain text input", - "value": { - "input": "hej verden", - "type": "text/plain", - "text_languages": ["dan", "und"], - "debug": False, - }, + openapi_examples={ + "text": { + "summary": "A basic example with plain text input", + "value": { + "input": "hej verden", + "type": "text/plain", + "text_languages": ["dan", "und"], + "debug": False, }, - "xml": { - "summary": "A basic example with xml input", - "value": { - "input": "

hej verden

", - "type": "application/readalong+xml", - "text_languages": ["dan", "und"], - "debug": False, - }, + }, + "xml": { + "summary": "A basic example with xml input", + "value": { + "input": "

hej verden

", + "type": "application/readalong+xml", + "text_languages": ["dan", "und"], + "debug": False, }, - } - ] + }, + } ), ): """Create an input RAS from the given text (as plain text or XML). @@ -331,7 +329,7 @@ class ConvertRequest(BaseModel): """\ - +
diff --git a/requirements.min.txt b/requirements.min.txt index f720ba43..e4970217 100644 --- a/requirements.min.txt +++ b/requirements.min.txt @@ -2,7 +2,7 @@ chevron==0.14.0 click>=8.0.4 coloredlogs>=10.0 -fastapi>=0.100.0 +fastapi>=0.103.0 g2p>=1.1.20230822, <3 lxml==4.9.4 numpy>=1.20.2