Esempio n. 1
0
def test_simplify_spec(app: FastAPI) -> None:
    simplify_operation_ids(app)
    assert app.openapi(
    )["paths"]["/endpoint-path"]["get"]["operationId"] == "endpoint_name"
Esempio n. 2
0
#@app.post(
#    "/api/topic/command/add_topic",
#    description="".join([
#        "this is a description. this is a description. this is a description. this is a description. this is a description. ",
#        "<br />",
#        "this is a description. this is a description. this is a description. this is a description. this is a description. ",
#        "<br />",
#        "this is a description. this is a description. this is a description. this is a description. this is a description. "
#    ]),
#    tags=["topic"],
#    response_model=AddTopicResponse
#)
#async def addTopic():
#    pass
#
#@app.post(
#    "/api/topic/command/rename_topic",
#    tags=["topic"]
#)
#async def renameTopic():
#    pass
#
#@app.post(
#    "/api/topic/command/remove_topic",
#    tags=["topic"]
#)
#async def removeTopic():
#    pass

simplify_operation_ids(app)