mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 04:42:38 +02:00
fixbug: invalid default project name
This commit is contained in:
parent
5115e04f8c
commit
f8dd30f133
13 changed files with 74 additions and 29 deletions
|
|
@ -5,6 +5,12 @@
|
|||
@Author : mashenquan
|
||||
@File : metagpt_oas3_api_svc.py
|
||||
@Desc : MetaGPT OpenAPI Specification 3.0 REST API service
|
||||
|
||||
curl -X 'POST' \
|
||||
'http://localhost:8080/openapi/greeting/dave' \
|
||||
-H 'accept: text/plain' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{}'
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
|
@ -15,7 +21,7 @@ import connexion
|
|||
def oas_http_svc():
|
||||
"""Start the OAS 3.0 OpenAPI HTTP service"""
|
||||
print("http://localhost:8080/oas3/ui/")
|
||||
specification_dir = Path(__file__).parent.parent.parent / ".well-known"
|
||||
specification_dir = Path(__file__).parent.parent.parent / "docs/.well-known"
|
||||
app = connexion.AsyncApp(__name__, specification_dir=str(specification_dir))
|
||||
app.add_api("metagpt_oas3_api.yaml")
|
||||
app.add_api("openapi.yaml")
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ async def post_greeting(name: str) -> str:
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
specification_dir = Path(__file__).parent.parent.parent / ".well-known"
|
||||
specification_dir = Path(__file__).parent.parent.parent / "docs/.well-known"
|
||||
app = connexion.AsyncApp(__name__, specification_dir=str(specification_dir))
|
||||
app.add_api("openapi.yaml", arguments={"title": "Hello World Example"})
|
||||
app.run(port=8082)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue