Skip to content

Commit

Permalink
fix: json typo
Browse files Browse the repository at this point in the history
Signed-off-by: hang lv <xlv20@fudan.edu.cn>
  • Loading branch information
n063h committed Jun 12, 2023
1 parent 1672cf8 commit 0c288e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mosec/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ def make_body(description, mime, schema):
request_worker_cls.resp_mime_type,
input_schema,
),
"responses": {
"responses": None
if not return_schema
else {
200: make_body(
"Mosec Inference Result",
response_worker_cls.resp_mime_type,
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ async fn run(opts: &Opts) {
let doc = MosecApiDoc {
api: RustApiDoc::openapi(),
}
.merge("/inference", python_api.parse().unwrap())
.merge("/inference", python_api.parse().unwrap_or_default())
.move_path("/inference", &opts.endpoint);

let state = AppState {
Expand Down

0 comments on commit 0c288e3

Please sign in to comment.