Skip to content

Commit

Permalink
FIX wrong parameter type #24
Browse files Browse the repository at this point in the history
  • Loading branch information
juliecoust committed Oct 12, 2021
1 parent dd7aaf1 commit 2106acc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 42 deletions.
78 changes: 38 additions & 40 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2987,27 +2987,26 @@
"summary":"Query Object Set Parents",
"description":"**Return object ids, with parent ones and projects** for the objects in given list.",
"operationId":"query_object_set_parents_object_set_parents_post",
"parameters":[
{
"description":"The list of object ids.",
"required":true,
"schema":{
"title":"Object IDs list",
"type":"array",
"items":{
"type":"integer"
"requestBody":{
"content":{
"application/json":{
"schema":{
"title":"Object IDs list",
"type":"array",
"items":{
"type":"integer"
},
"description":"The list of object ids."
},
"description":"The list of object ids."
},
"example":[
634509,
6234516,
976544
],
"name":"object_ids",
"in":"query"
}
],
"example":[
634509,
6234516,
976544
]
}
},
"required":true
},
"responses":{
"200":{
"description":"Successful Response",
Expand Down Expand Up @@ -3192,27 +3191,26 @@
"summary":"Erase Object Set",
"description":"**Delete the objects with given object ids.** \n\n**Returns** the number of : **deleted objects**, 0, **deleated image rows** and **deleated image files**.\n\n🔒 Current user needs *Manage* right on all projects of specified objects.",
"operationId":"erase_object_set_object_set__delete",
"parameters":[
{
"description":"The list of object ids.",
"required":true,
"schema":{
"title":"Object IDs list",
"type":"array",
"items":{
"type":"integer"
"requestBody":{
"content":{
"application/json":{
"schema":{
"title":"Object IDs list",
"type":"array",
"items":{
"type":"integer"
},
"description":"The list of object ids."
},
"description":"The list of object ids."
},
"example":[
634509,
6234516,
976544
],
"name":"object_ids",
"in":"query"
}
],
"example":[
634509,
6234516,
976544
]
}
},
"required":true
},
"responses":{
"200":{
"description":"Successful Response",
Expand Down
4 changes: 2 additions & 2 deletions py/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ def classify_auto_object_set(req: ClassifyAutoReq = Body(...),
@app.post("/object_set/parents", tags=['objects'], response_model=ObjectSetQueryRsp,
response_class=MyORJSONResponse # Force the ORJSON encoder
)
def query_object_set_parents(object_ids: ObjectIDListT = Query(..., title="Object IDs list",
def query_object_set_parents(object_ids: ObjectIDListT = Body(..., title="Object IDs list",
description="The list of object ids.",
example=[634509,6234516,976544]),
current_user: int = Depends(get_current_user)) -> ObjectSetQueryRsp:
Expand Down Expand Up @@ -1417,7 +1417,7 @@ def compute_project_cnn(proj_id: int = Path(..., description="Internal, numeric
}
}
})
def erase_object_set(object_ids: ObjectIDListT = Query(..., title="Object IDs list",
def erase_object_set(object_ids: ObjectIDListT = Body(..., title="Object IDs list",
description="The list of object ids.",
example=[634509,6234516,976544]),
current_user: int = Depends(get_current_user)) -> Tuple[int, int, int, int]:
Expand Down

0 comments on commit 2106acc

Please sign in to comment.