Skip to content

Commit

Permalink
chore: change update to patch for models update (#1444)
Browse files Browse the repository at this point in the history
* chore: change update to patch

* fix: swagger
  • Loading branch information
vansangpfiev authored Oct 7, 2024
1 parent 680c011 commit 9363761
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engine/controllers/models.h
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ class Models : public drogon::HttpController<Models> {
METHOD_ADD(Models::PullModel, "/pull", Post);
METHOD_ADD(Models::ListModel, "", Get);
METHOD_ADD(Models::GetModel, "/{1}", Get);
METHOD_ADD(Models::UpdateModel, "/{1}", Post);
METHOD_ADD(Models::UpdateModel, "/{1}", Patch);
METHOD_ADD(Models::ImportModel, "/import", Post);
METHOD_ADD(Models::DeleteModel, "/{1}", Delete);
METHOD_ADD(Models::SetModelAlias, "/alias", Post);
@@ -24,7 +24,7 @@ class Models : public drogon::HttpController<Models> {
ADD_METHOD_TO(Models::PullModel, "/v1/models/pull", Post);
ADD_METHOD_TO(Models::ListModel, "/v1/models", Get);
ADD_METHOD_TO(Models::GetModel, "/v1/models/{1}", Get);
ADD_METHOD_TO(Models::UpdateModel, "/v1/models/{1}", Post);
ADD_METHOD_TO(Models::UpdateModel, "/v1/models/{1}", Patch);
ADD_METHOD_TO(Models::ImportModel, "/v1/models/import", Post);
ADD_METHOD_TO(Models::DeleteModel, "/v1/models/{1}", Delete);
ADD_METHOD_TO(Models::SetModelAlias, "/v1/models/alias", Post);
2 changes: 1 addition & 1 deletion engine/controllers/swagger.cc
Original file line number Diff line number Diff line change
@@ -211,7 +211,7 @@ Json::Value SwaggerController::generateOpenAPISpec() {
["message"]["type"] = "string";

// UpdateModel Endpoint
Json::Value& update = spec["paths"]["/v1/models/{model}"]["post"];
Json::Value& update = spec["paths"]["/v1/models/{model}"]["patch"];
update["summary"] = "Update model details";
update["description"] =
"Update various attributes of a model based on the ModelConfig "

0 comments on commit 9363761

Please sign in to comment.