diff --git a/agdb_api/php/README.md b/agdb_api/php/README.md index 6208a590..866ef8da 100644 --- a/agdb_api/php/README.md +++ b/agdb_api/php/README.md @@ -97,14 +97,14 @@ Class | Method | HTTP request | Description *RoutesdbApi* | [**dbBackup**](docs/Api/RoutesdbApi.md#dbbackup) | **POST** /api/v1/db/{owner}/{db}/backup | *RoutesdbApi* | [**dbClear**](docs/Api/RoutesdbApi.md#dbclear) | **POST** /api/v1/db/{owner}/{db}/clear | *RoutesdbApi* | [**dbCopy**](docs/Api/RoutesdbApi.md#dbcopy) | **POST** /api/v1/db/{owner}/{db}/copy | -*RoutesdbApi* | [**dbDelete**](docs/Api/RoutesdbApi.md#dbdelete) | **POST** /api/v1/db/{owner}/{db}/delete | +*RoutesdbApi* | [**dbDelete**](docs/Api/RoutesdbApi.md#dbdelete) | **DELETE** /api/v1/db/{owner}/{db}/delete | *RoutesdbApi* | [**dbExec**](docs/Api/RoutesdbApi.md#dbexec) | **POST** /api/v1/db/{owner}/{db}/exec | *RoutesdbApi* | [**dbList**](docs/Api/RoutesdbApi.md#dblist) | **GET** /api/v1/db/list | *RoutesdbApi* | [**dbOptimize**](docs/Api/RoutesdbApi.md#dboptimize) | **POST** /api/v1/db/{owner}/{db}/optimize | -*RoutesdbApi* | [**dbRemove**](docs/Api/RoutesdbApi.md#dbremove) | **POST** /api/v1/db/{owner}/{db}/remove | +*RoutesdbApi* | [**dbRemove**](docs/Api/RoutesdbApi.md#dbremove) | **DELETE** /api/v1/db/{owner}/{db}/remove | *RoutesdbApi* | [**dbRename**](docs/Api/RoutesdbApi.md#dbrename) | **POST** /api/v1/db/{owner}/{db}/rename | *RoutesdbApi* | [**dbRestore**](docs/Api/RoutesdbApi.md#dbrestore) | **POST** /api/v1/db/{owner}/{db}/restore | -*RoutesdbuserApi* | [**dbUserAdd**](docs/Api/RoutesdbuserApi.md#dbuseradd) | **POST** /api/v1/db/{owner}/{db}/user/{username}/add | +*RoutesdbuserApi* | [**dbUserAdd**](docs/Api/RoutesdbuserApi.md#dbuseradd) | **PUT** /api/v1/db/{owner}/{db}/user/{username}/add | *RoutesdbuserApi* | [**dbUserList**](docs/Api/RoutesdbuserApi.md#dbuserlist) | **GET** /api/v1/db/{owner}/{db}/user/list | *RoutesdbuserApi* | [**dbUserRemove**](docs/Api/RoutesdbuserApi.md#dbuserremove) | **POST** /api/v1/db/{owner}/{db}/user/{username}/remove | *RoutesuserApi* | [**userChangePassword**](docs/Api/RoutesuserApi.md#userchangepassword) | **PUT** /api/v1/user/change_password | diff --git a/agdb_api/php/docs/Api/RoutesdbApi.md b/agdb_api/php/docs/Api/RoutesdbApi.md index 757db055..b329be87 100644 --- a/agdb_api/php/docs/Api/RoutesdbApi.md +++ b/agdb_api/php/docs/Api/RoutesdbApi.md @@ -9,11 +9,11 @@ All URIs are relative to http://localhost:3000, except if the operation defines | [**dbBackup()**](RoutesdbApi.md#dbBackup) | **POST** /api/v1/db/{owner}/{db}/backup | | | [**dbClear()**](RoutesdbApi.md#dbClear) | **POST** /api/v1/db/{owner}/{db}/clear | | | [**dbCopy()**](RoutesdbApi.md#dbCopy) | **POST** /api/v1/db/{owner}/{db}/copy | | -| [**dbDelete()**](RoutesdbApi.md#dbDelete) | **POST** /api/v1/db/{owner}/{db}/delete | | +| [**dbDelete()**](RoutesdbApi.md#dbDelete) | **DELETE** /api/v1/db/{owner}/{db}/delete | | | [**dbExec()**](RoutesdbApi.md#dbExec) | **POST** /api/v1/db/{owner}/{db}/exec | | | [**dbList()**](RoutesdbApi.md#dbList) | **GET** /api/v1/db/list | | | [**dbOptimize()**](RoutesdbApi.md#dbOptimize) | **POST** /api/v1/db/{owner}/{db}/optimize | | -| [**dbRemove()**](RoutesdbApi.md#dbRemove) | **POST** /api/v1/db/{owner}/{db}/remove | | +| [**dbRemove()**](RoutesdbApi.md#dbRemove) | **DELETE** /api/v1/db/{owner}/{db}/remove | | | [**dbRename()**](RoutesdbApi.md#dbRename) | **POST** /api/v1/db/{owner}/{db}/rename | | | [**dbRestore()**](RoutesdbApi.md#dbRestore) | **POST** /api/v1/db/{owner}/{db}/restore | | diff --git a/agdb_api/php/docs/Api/RoutesdbuserApi.md b/agdb_api/php/docs/Api/RoutesdbuserApi.md index 81f7a4ee..6804fc82 100644 --- a/agdb_api/php/docs/Api/RoutesdbuserApi.md +++ b/agdb_api/php/docs/Api/RoutesdbuserApi.md @@ -4,7 +4,7 @@ All URIs are relative to http://localhost:3000, except if the operation defines | Method | HTTP request | Description | | ------------- | ------------- | ------------- | -| [**dbUserAdd()**](RoutesdbuserApi.md#dbUserAdd) | **POST** /api/v1/db/{owner}/{db}/user/{username}/add | | +| [**dbUserAdd()**](RoutesdbuserApi.md#dbUserAdd) | **PUT** /api/v1/db/{owner}/{db}/user/{username}/add | | | [**dbUserList()**](RoutesdbuserApi.md#dbUserList) | **GET** /api/v1/db/{owner}/{db}/user/list | | | [**dbUserRemove()**](RoutesdbuserApi.md#dbUserRemove) | **POST** /api/v1/db/{owner}/{db}/user/{username}/remove | | diff --git a/agdb_api/php/lib/Api/RoutesdbApi.php b/agdb_api/php/lib/Api/RoutesdbApi.php index d31beb99..bc8c107e 100644 --- a/agdb_api/php/lib/Api/RoutesdbApi.php +++ b/agdb_api/php/lib/Api/RoutesdbApi.php @@ -1837,7 +1837,7 @@ public function dbDeleteRequest($owner, $db, string $contentType = self::content $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3030,7 +3030,7 @@ public function dbRemoveRequest($owner, $db, string $contentType = self::content $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/agdb_api/php/lib/Api/RoutesdbuserApi.php b/agdb_api/php/lib/Api/RoutesdbuserApi.php index 677292a6..bf79751e 100644 --- a/agdb_api/php/lib/Api/RoutesdbuserApi.php +++ b/agdb_api/php/lib/Api/RoutesdbuserApi.php @@ -407,7 +407,7 @@ public function dbUserAddRequest($owner, $db, $username, $db_role, string $conte $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/agdb_api/typescript/src/schema.d.ts b/agdb_api/typescript/src/schema.d.ts index 8d24bf73..0e0d8931 100644 --- a/agdb_api/typescript/src/schema.d.ts +++ b/agdb_api/typescript/src/schema.d.ts @@ -2513,7 +2513,7 @@ export interface PathsDictionary { /** * db_delete */ - 'post'( + 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig @@ -2543,7 +2543,7 @@ export interface PathsDictionary { /** * db_remove */ - 'post'( + 'delete'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig @@ -2583,7 +2583,7 @@ export interface PathsDictionary { /** * db_user_add */ - 'post'( + 'put'( parameters?: Parameters | null, data?: any, config?: AxiosRequestConfig diff --git a/agdb_server/openapi/schema.json b/agdb_server/openapi/schema.json index b6e63c25..11e76b7a 100644 --- a/agdb_server/openapi/schema.json +++ b/agdb_server/openapi/schema.json @@ -1237,7 +1237,7 @@ } }, "/api/v1/db/{owner}/{db}/delete": { - "post": { + "delete": { "tags": [ "routes::db" ], @@ -1399,7 +1399,7 @@ } }, "/api/v1/db/{owner}/{db}/remove": { - "post": { + "delete": { "tags": [ "routes::db" ], @@ -1598,7 +1598,7 @@ } }, "/api/v1/db/{owner}/{db}/user/{username}/add": { - "post": { + "put": { "tags": [ "routes::db::user" ], diff --git a/agdb_server/src/routes/db.rs b/agdb_server/src/routes/db.rs index 83dd7cc6..238e18c9 100644 --- a/agdb_server/src/routes/db.rs +++ b/agdb_server/src/routes/db.rs @@ -191,7 +191,7 @@ pub(crate) async fn copy( Ok(StatusCode::CREATED) } -#[utoipa::path(post, +#[utoipa::path(delete, path = "/api/v1/db/{owner}/{db}/delete", operation_id = "db_delete", security(("Token" = [])), @@ -287,7 +287,7 @@ pub(crate) async fn optimize( Ok((StatusCode::OK, Json(db))) } -#[utoipa::path(post, +#[utoipa::path(delete, path = "/api/v1/db/{owner}/{db}/remove", operation_id = "db_remove", security(("Token" = [])), diff --git a/agdb_server/src/routes/db/user.rs b/agdb_server/src/routes/db/user.rs index a07d94e2..6ebd4453 100644 --- a/agdb_server/src/routes/db/user.rs +++ b/agdb_server/src/routes/db/user.rs @@ -18,7 +18,7 @@ pub(crate) struct DbUserRoleParam { pub(crate) db_role: DbUserRole, } -#[utoipa::path(post, +#[utoipa::path(put, path = "/api/v1/db/{owner}/{db}/user/{username}/add", operation_id = "db_user_add", security(("Token" = [])),