diff options
Diffstat (limited to 'crates/rocie-client')
120 files changed, 2442 insertions, 1578 deletions
diff --git a/crates/rocie-client/Cargo.toml b/crates/rocie-client/Cargo.toml index f69441e..edabddf 100644 --- a/crates/rocie-client/Cargo.toml +++ b/crates/rocie-client/Cargo.toml @@ -8,9 +8,17 @@ edition = "2024" [dependencies] serde = { version = "^1.0", features = ["derive"] } -serde_with = { version = "^3.8", default-features = false, features = ["base64", "std", "macros"] } +serde_with = { version = "^3.8", default-features = false, features = [ + "base64", + "std", + "macros", +] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" uuid = { version = "^1.8", features = ["serde", "v4"] } -reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart", "cookies"] } +reqwest = { version = "^0.12", default-features = false, features = [ + "json", + "multipart", + "cookies", +] } diff --git a/crates/rocie-client/README.md b/crates/rocie-client/README.md index ebcdd73..03a4362 100644 --- a/crates/rocie-client/README.md +++ b/crates/rocie-client/README.md @@ -2,10 +2,12 @@ An enterprise grocery management system - server - ## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. +This API client was generated by the +[OpenAPI Generator](https://openapi-generator.tech) project. By using the +[openapi-spec](https://openapis.org) from a remote server, you can easily +generate an API client. - API version: 0.1.0 - Package version: 0.1.0 @@ -14,7 +16,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Installation -Put the package under your project folder in a directory named `rocie-client` and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `rocie-client` +and add the following to `Cargo.toml` under `[dependencies]`: ``` rocie-client = { path = "./rocie-client" } @@ -22,71 +25,69 @@ rocie-client = { path = "./rocie-client" } ## Documentation for API Endpoints -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ApiGetAuthInventoryApi* | [**amount_by_id**](docs/ApiGetAuthInventoryApi.md#amount_by_id) | **GET** /inventory/{id} | Get the amount of an product -*ApiGetAuthProductApi* | [**product_by_id**](docs/ApiGetAuthProductApi.md#product_by_id) | **GET** /product/by-id/{id} | Get Product by id -*ApiGetAuthProductApi* | [**product_by_name**](docs/ApiGetAuthProductApi.md#product_by_name) | **GET** /product/by-name/{name} | Get Product by name -*ApiGetAuthProductApi* | [**product_suggestion_by_name**](docs/ApiGetAuthProductApi.md#product_suggestion_by_name) | **GET** /product/by-part-name/{name} | Get Product suggestion by name -*ApiGetAuthProductApi* | [**products_by_product_parent_id_direct**](docs/ApiGetAuthProductApi.md#products_by_product_parent_id_direct) | **GET** /product/by-product-parent-id-direct/{id} | Get Products by it's product parent id -*ApiGetAuthProductApi* | [**products_by_product_parent_id_indirect**](docs/ApiGetAuthProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id -*ApiGetAuthProductApi* | [**products_in_storage**](docs/ApiGetAuthProductApi.md#products_in_storage) | **GET** /products_in_storage/ | Return all products, which non-null amount in storage -*ApiGetAuthProductApi* | [**products_registered**](docs/ApiGetAuthProductApi.md#products_registered) | **GET** /products_registered/ | Return all registered products -*ApiGetAuthProductParentApi* | [**product_parents**](docs/ApiGetAuthProductParentApi.md#product_parents) | **GET** /product_parents/ | Return all registered product parents -*ApiGetAuthProductParentApi* | [**product_parents_toplevel**](docs/ApiGetAuthProductParentApi.md#product_parents_toplevel) | **GET** /product_parents_toplevel/ | Return all registered product parents, that have no parents themselves -*ApiGetAuthProductParentApi* | [**product_parents_under**](docs/ApiGetAuthProductParentApi.md#product_parents_under) | **GET** /product_parents_under/{id} | Return all parents, that have this parent as parent -*ApiGetAuthRecipeApi* | [**recipe_by_id**](docs/ApiGetAuthRecipeApi.md#recipe_by_id) | **GET** /recipe/by-id/{id} | Get an recipe by it's id. -*ApiGetAuthRecipeApi* | [**recipes**](docs/ApiGetAuthRecipeApi.md#recipes) | **GET** /recipe/all | Get all added recipes -*ApiGetAuthUnitApi* | [**unit_by_id**](docs/ApiGetAuthUnitApi.md#unit_by_id) | **GET** /unit/{id} | Get Unit by id -*ApiGetAuthUnitApi* | [**units**](docs/ApiGetAuthUnitApi.md#units) | **GET** /units/ | Return all registered units -*ApiGetAuthUnitApi* | [**units_by_property_id**](docs/ApiGetAuthUnitApi.md#units_by_property_id) | **GET** /units-by-property/{id} | Return all registered units for a specific unit property -*ApiGetAuthUnitPropertyApi* | [**unit_properties**](docs/ApiGetAuthUnitPropertyApi.md#unit_properties) | **GET** /unit-properties/ | Return all registered unit properties -*ApiGetAuthUnitPropertyApi* | [**unit_property_by_id**](docs/ApiGetAuthUnitPropertyApi.md#unit_property_by_id) | **GET** /unit-property/{id} | Get Unit property by id -*ApiGetAuthUserApi* | [**user_by_id**](docs/ApiGetAuthUserApi.md#user_by_id) | **GET** /user/{id} | Get an specific user by id. -*ApiGetAuthUserApi* | [**users**](docs/ApiGetAuthUserApi.md#users) | **GET** /users | Get all registered users. -*ApiSetAuthBarcodeApi* | [**buy_barcode**](docs/ApiSetAuthBarcodeApi.md#buy_barcode) | **POST** /barcode/{barcode_id}/buy/{times} | Buy an barcode -*ApiSetAuthBarcodeApi* | [**consume_barcode**](docs/ApiSetAuthBarcodeApi.md#consume_barcode) | **POST** /barcode/{id}/consume | Consume an barcode -*ApiSetAuthProductApi* | [**associate_barcode**](docs/ApiSetAuthProductApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product -*ApiSetAuthProductApi* | [**register_product**](docs/ApiSetAuthProductApi.md#register_product) | **POST** /product/new | Register a product -*ApiSetAuthProductParentApi* | [**register_product_parent**](docs/ApiSetAuthProductParentApi.md#register_product_parent) | **POST** /product_parent/new | Register a product parent -*ApiSetAuthRecipeApi* | [**add_recipe**](docs/ApiSetAuthRecipeApi.md#add_recipe) | **POST** /recipe/new | Register a product parent -*ApiSetAuthUnitApi* | [**register_unit**](docs/ApiSetAuthUnitApi.md#register_unit) | **POST** /unit/new | Register an Unit -*ApiSetAuthUnitPropertyApi* | [**register_unit_property**](docs/ApiSetAuthUnitPropertyApi.md#register_unit_property) | **POST** /unit-property/new | Register an Unit Property -*ApiSetAuthUserApi* | [**register_user**](docs/ApiSetAuthUserApi.md#register_user) | **POST** /user/new | Register an new User -*ApiSetNoAuthUserApi* | [**login**](docs/ApiSetNoAuthUserApi.md#login) | **POST** /login | Log in as a specific user -*ApiSetNoAuthUserApi* | [**logout**](docs/ApiSetNoAuthUserApi.md#logout) | **POST** /logout | Log the current user out -*ApiSetNoAuthUserApi* | [**provision**](docs/ApiSetNoAuthUserApi.md#provision) | **POST** /provision | Provision this instance. - +All URIs are relative to _http://localhost_ + +| Class | Method | HTTP request | Description | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------- | +| _ApiGetAuthInventoryApi_ | [**amount_by_id**](docs/ApiGetAuthInventoryApi.md#amount_by_id) | **GET** /inventory/{id} | Get the amount of an product | +| _ApiGetAuthProductApi_ | [**product_by_id**](docs/ApiGetAuthProductApi.md#product_by_id) | **GET** /product/by-id/{id} | Get Product by id | +| _ApiGetAuthProductApi_ | [**product_by_name**](docs/ApiGetAuthProductApi.md#product_by_name) | **GET** /product/by-name/{name} | Get Product by name | +| _ApiGetAuthProductApi_ | [**product_suggestion_by_name**](docs/ApiGetAuthProductApi.md#product_suggestion_by_name) | **GET** /product/by-part-name/{name} | Get Product suggestion by name | +| _ApiGetAuthProductApi_ | [**products_by_product_parent_id_direct**](docs/ApiGetAuthProductApi.md#products_by_product_parent_id_direct) | **GET** /product/by-product-parent-id-direct/{id} | Get Products by it's product parent id | +| _ApiGetAuthProductApi_ | [**products_by_product_parent_id_indirect**](docs/ApiGetAuthProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id | +| _ApiGetAuthProductApi_ | [**products_in_storage**](docs/ApiGetAuthProductApi.md#products_in_storage) | **GET** /products_in_storage/ | Return all products, which non-null amount in storage | +| _ApiGetAuthProductApi_ | [**products_registered**](docs/ApiGetAuthProductApi.md#products_registered) | **GET** /products_registered/ | Return all registered products | +| _ApiGetAuthProductParentApi_ | [**product_parents**](docs/ApiGetAuthProductParentApi.md#product_parents) | **GET** /product_parents/ | Return all registered product parents | +| _ApiGetAuthProductParentApi_ | [**product_parents_toplevel**](docs/ApiGetAuthProductParentApi.md#product_parents_toplevel) | **GET** /product_parents_toplevel/ | Return all registered product parents, that have no parents themselves | +| _ApiGetAuthProductParentApi_ | [**product_parents_under**](docs/ApiGetAuthProductParentApi.md#product_parents_under) | **GET** /product_parents_under/{id} | Return all parents, that have this parent as parent | +| _ApiGetAuthRecipeApi_ | [**recipe_by_id**](docs/ApiGetAuthRecipeApi.md#recipe_by_id) | **GET** /recipe/by-id/{id} | Get an recipe by it's id. | +| _ApiGetAuthRecipeApi_ | [**recipes**](docs/ApiGetAuthRecipeApi.md#recipes) | **GET** /recipe/all | Get all added recipes | +| _ApiGetAuthUnitApi_ | [**unit_by_id**](docs/ApiGetAuthUnitApi.md#unit_by_id) | **GET** /unit/{id} | Get Unit by id | +| _ApiGetAuthUnitApi_ | [**units**](docs/ApiGetAuthUnitApi.md#units) | **GET** /units/ | Return all registered units | +| _ApiGetAuthUnitApi_ | [**units_by_property_id**](docs/ApiGetAuthUnitApi.md#units_by_property_id) | **GET** /units-by-property/{id} | Return all registered units for a specific unit property | +| _ApiGetAuthUnitPropertyApi_ | [**unit_properties**](docs/ApiGetAuthUnitPropertyApi.md#unit_properties) | **GET** /unit-properties/ | Return all registered unit properties | +| _ApiGetAuthUnitPropertyApi_ | [**unit_property_by_id**](docs/ApiGetAuthUnitPropertyApi.md#unit_property_by_id) | **GET** /unit-property/{id} | Get Unit property by id | +| _ApiGetAuthUserApi_ | [**user_by_id**](docs/ApiGetAuthUserApi.md#user_by_id) | **GET** /user/{id} | Get an specific user by id. | +| _ApiGetAuthUserApi_ | [**users**](docs/ApiGetAuthUserApi.md#users) | **GET** /users | Get all registered users. | +| _ApiSetAuthBarcodeApi_ | [**buy_barcode**](docs/ApiSetAuthBarcodeApi.md#buy_barcode) | **POST** /barcode/{barcode_id}/buy/{times} | Buy an barcode | +| _ApiSetAuthBarcodeApi_ | [**consume_barcode**](docs/ApiSetAuthBarcodeApi.md#consume_barcode) | **POST** /barcode/{id}/consume | Consume an barcode | +| _ApiSetAuthProductApi_ | [**associate_barcode**](docs/ApiSetAuthProductApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product | +| _ApiSetAuthProductApi_ | [**register_product**](docs/ApiSetAuthProductApi.md#register_product) | **POST** /product/new | Register a product | +| _ApiSetAuthProductParentApi_ | [**register_product_parent**](docs/ApiSetAuthProductParentApi.md#register_product_parent) | **POST** /product_parent/new | Register a product parent | +| _ApiSetAuthRecipeApi_ | [**add_recipe**](docs/ApiSetAuthRecipeApi.md#add_recipe) | **POST** /recipe/new | Register a product parent | +| _ApiSetAuthUnitApi_ | [**register_unit**](docs/ApiSetAuthUnitApi.md#register_unit) | **POST** /unit/new | Register an Unit | +| _ApiSetAuthUnitPropertyApi_ | [**register_unit_property**](docs/ApiSetAuthUnitPropertyApi.md#register_unit_property) | **POST** /unit-property/new | Register an Unit Property | +| _ApiSetAuthUserApi_ | [**register_user**](docs/ApiSetAuthUserApi.md#register_user) | **POST** /user/new | Register an new User | +| _ApiSetNoAuthUserApi_ | [**login**](docs/ApiSetNoAuthUserApi.md#login) | **POST** /login | Log in as a specific user | +| _ApiSetNoAuthUserApi_ | [**logout**](docs/ApiSetNoAuthUserApi.md#logout) | **POST** /logout | Log the current user out | +| _ApiSetNoAuthUserApi_ | [**provision**](docs/ApiSetNoAuthUserApi.md#provision) | **POST** /provision | Provision this instance. | ## Documentation For Models - - [Barcode](docs/Barcode.md) - - [BarcodeId](docs/BarcodeId.md) - - [LoginInfo](docs/LoginInfo.md) - - [PasswordHash](docs/PasswordHash.md) - - [Product](docs/Product.md) - - [ProductAmount](docs/ProductAmount.md) - - [ProductId](docs/ProductId.md) - - [ProductParent](docs/ProductParent.md) - - [ProductParentId](docs/ProductParentId.md) - - [ProductParentStub](docs/ProductParentStub.md) - - [ProductStub](docs/ProductStub.md) - - [Recipe](docs/Recipe.md) - - [RecipeId](docs/RecipeId.md) - - [RecipeStub](docs/RecipeStub.md) - - [Unit](docs/Unit.md) - - [UnitAmount](docs/UnitAmount.md) - - [UnitId](docs/UnitId.md) - - [UnitProperty](docs/UnitProperty.md) - - [UnitPropertyId](docs/UnitPropertyId.md) - - [UnitPropertyStub](docs/UnitPropertyStub.md) - - [UnitStub](docs/UnitStub.md) - - [User](docs/User.md) - - [UserId](docs/UserId.md) - - [UserStub](docs/UserStub.md) - +- [Barcode](docs/Barcode.md) +- [BarcodeId](docs/BarcodeId.md) +- [LoginInfo](docs/LoginInfo.md) +- [PasswordHash](docs/PasswordHash.md) +- [Product](docs/Product.md) +- [ProductAmount](docs/ProductAmount.md) +- [ProductId](docs/ProductId.md) +- [ProductParent](docs/ProductParent.md) +- [ProductParentId](docs/ProductParentId.md) +- [ProductParentStub](docs/ProductParentStub.md) +- [ProductStub](docs/ProductStub.md) +- [Recipe](docs/Recipe.md) +- [RecipeId](docs/RecipeId.md) +- [RecipeStub](docs/RecipeStub.md) +- [Unit](docs/Unit.md) +- [UnitAmount](docs/UnitAmount.md) +- [UnitId](docs/UnitId.md) +- [UnitProperty](docs/UnitProperty.md) +- [UnitPropertyId](docs/UnitPropertyId.md) +- [UnitPropertyStub](docs/UnitPropertyStub.md) +- [UnitStub](docs/UnitStub.md) +- [User](docs/User.md) +- [UserId](docs/UserId.md) +- [UserStub](docs/UserStub.md) To get access to the crate's generated documentation, use: @@ -97,4 +98,3 @@ cargo doc --open ## Author benedikt.peetz@b-peetz.de - diff --git a/crates/rocie-client/docs/ApiGetApi.md b/crates/rocie-client/docs/ApiGetApi.md index 1ecfb75..18e026b 100644 --- a/crates/rocie-client/docs/ApiGetApi.md +++ b/crates/rocie-client/docs/ApiGetApi.md @@ -1,25 +1,21 @@ -# \ApiGetApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**product_by_id**](ApiGetApi.md#product_by_id) | **GET** /product/{id} | Get Product by id -[**products**](ApiGetApi.md#products) | **GET** /products/ | Return all registered products +# \\ApiGetApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------- | --------------------- | ------------------------------ | +| [**product_by_id**](ApiGetApi.md#product_by_id) | **GET** /product/{id} | Get Product by id | +| [**products**](ApiGetApi.md#products) | **GET** /products/ | Return all registered products | ## product_by_id -> models::Product product_by_id(id) -Get Product by id +> models::Product product_by_id(id) Get Product by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **uuid::Uuid** | Product id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------- | ----------- | ---------- | ----- | +| **id** | **uuid::Uuid** | Product id | [required] | ### Return type @@ -34,13 +30,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products -> Vec<models::Product> products() -Return all registered products +> Vec<models::Product> products() Return all registered products ### Parameters @@ -59,5 +56,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthInventoryApi.md b/crates/rocie-client/docs/ApiGetAuthInventoryApi.md index ece4d4b..1551249 100644 --- a/crates/rocie-client/docs/ApiGetAuthInventoryApi.md +++ b/crates/rocie-client/docs/ApiGetAuthInventoryApi.md @@ -1,24 +1,20 @@ -# \ApiGetAuthInventoryApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**amount_by_id**](ApiGetAuthInventoryApi.md#amount_by_id) | **GET** /inventory/{id} | Get the amount of an product +# \\ApiGetAuthInventoryApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ---------------------------------------------------------- | ----------------------- | ---------------------------- | +| [**amount_by_id**](ApiGetAuthInventoryApi.md#amount_by_id) | **GET** /inventory/{id} | Get the amount of an product | ## amount_by_id -> models::ProductAmount amount_by_id(id) -Get the amount of an product +> models::ProductAmount amount_by_id(id) Get the amount of an product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductId**](.md) | Product id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------- | ----------- | ---------- | ----- | +| **id** | [**ProductId**](.md) | Product id | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthProductApi.md b/crates/rocie-client/docs/ApiGetAuthProductApi.md index 8af92f3..44471fa 100644 --- a/crates/rocie-client/docs/ApiGetAuthProductApi.md +++ b/crates/rocie-client/docs/ApiGetAuthProductApi.md @@ -1,30 +1,26 @@ -# \ApiGetAuthProductApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**product_by_id**](ApiGetAuthProductApi.md#product_by_id) | **GET** /product/by-id/{id} | Get Product by id -[**product_by_name**](ApiGetAuthProductApi.md#product_by_name) | **GET** /product/by-name/{name} | Get Product by name -[**product_suggestion_by_name**](ApiGetAuthProductApi.md#product_suggestion_by_name) | **GET** /product/by-part-name/{name} | Get Product suggestion by name -[**products_by_product_parent_id_direct**](ApiGetAuthProductApi.md#products_by_product_parent_id_direct) | **GET** /product/by-product-parent-id-direct/{id} | Get Products by it's product parent id -[**products_by_product_parent_id_indirect**](ApiGetAuthProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id -[**products_in_storage**](ApiGetAuthProductApi.md#products_in_storage) | **GET** /products_in_storage/ | Return all products, which non-null amount in storage -[**products_registered**](ApiGetAuthProductApi.md#products_registered) | **GET** /products_registered/ | Return all registered products +# \\ApiGetAuthProductApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------- | ----------------------------------------------------- | +| [**product_by_id**](ApiGetAuthProductApi.md#product_by_id) | **GET** /product/by-id/{id} | Get Product by id | +| [**product_by_name**](ApiGetAuthProductApi.md#product_by_name) | **GET** /product/by-name/{name} | Get Product by name | +| [**product_suggestion_by_name**](ApiGetAuthProductApi.md#product_suggestion_by_name) | **GET** /product/by-part-name/{name} | Get Product suggestion by name | +| [**products_by_product_parent_id_direct**](ApiGetAuthProductApi.md#products_by_product_parent_id_direct) | **GET** /product/by-product-parent-id-direct/{id} | Get Products by it's product parent id | +| [**products_by_product_parent_id_indirect**](ApiGetAuthProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id | +| [**products_in_storage**](ApiGetAuthProductApi.md#products_in_storage) | **GET** /products_in_storage/ | Return all products, which non-null amount in storage | +| [**products_registered**](ApiGetAuthProductApi.md#products_registered) | **GET** /products_registered/ | Return all registered products | ## product_by_id -> models::Product product_by_id(id) -Get Product by id +> models::Product product_by_id(id) Get Product by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductId**](.md) | Product id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------- | ----------- | ---------- | ----- | +| **id** | [**ProductId**](.md) | Product id | [required] | ### Return type @@ -39,20 +35,20 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_by_name -> models::Product product_by_name(name) -Get Product by name +> models::Product product_by_name(name) Get Product by name ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | Name of the product | [required] | +| Name | Type | Description | Required | Notes | +| -------- | ---------- | ------------------- | ---------- | ----- | +| **name** | **String** | Name of the product | [required] | ### Return type @@ -67,20 +63,21 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_suggestion_by_name -> Vec<models::Product> product_suggestion_by_name(name) -Get Product suggestion by name +> Vec<models::Product> product_suggestion_by_name(name) Get Product suggestion +> by name ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | Partial name of a product | [required] | +| Name | Type | Description | Required | Notes | +| -------- | ---------- | ------------------------- | ---------- | ----- | +| **name** | **String** | Partial name of a product | [required] | ### Return type @@ -95,22 +92,23 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_by_product_parent_id_direct -> Vec<models::Product> products_by_product_parent_id_direct(id) -Get Products by it's product parent id +> Vec<models::Product> products_by_product_parent_id_direct(id) Get Products by +> it's product parent id This will only return products directly associated with this product parent id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductParentId**](.md) | Product parent id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------------- | ----------------- | ---------- | ----- | +| **id** | [**ProductParentId**](.md) | Product parent id | [required] | ### Return type @@ -125,22 +123,23 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_by_product_parent_id_indirect -> Vec<models::Product> products_by_product_parent_id_indirect(id) -Get Products by it's product parent id +> Vec<models::Product> products_by_product_parent_id_indirect(id) Get Products +> by it's product parent id This will also return all products below this product parent id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductParentId**](.md) | Product parent id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------------- | ----------------- | ---------- | ----- | +| **id** | [**ProductParentId**](.md) | Product parent id | [required] | ### Return type @@ -155,13 +154,15 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_in_storage -> Vec<models::Product> products_in_storage() -Return all products, which non-null amount in storage +> Vec<models::Product> products_in_storage() Return all products, which non-null +> amount in storage ### Parameters @@ -180,13 +181,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_registered -> Vec<models::Product> products_registered() -Return all registered products +> Vec<models::Product> products_registered() Return all registered products ### Parameters @@ -205,5 +207,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthProductParentApi.md b/crates/rocie-client/docs/ApiGetAuthProductParentApi.md index fbdc3b1..f51a316 100644 --- a/crates/rocie-client/docs/ApiGetAuthProductParentApi.md +++ b/crates/rocie-client/docs/ApiGetAuthProductParentApi.md @@ -1,19 +1,17 @@ -# \ApiGetAuthProductParentApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**product_parents**](ApiGetAuthProductParentApi.md#product_parents) | **GET** /product_parents/ | Return all registered product parents -[**product_parents_toplevel**](ApiGetAuthProductParentApi.md#product_parents_toplevel) | **GET** /product_parents_toplevel/ | Return all registered product parents, that have no parents themselves -[**product_parents_under**](ApiGetAuthProductParentApi.md#product_parents_under) | **GET** /product_parents_under/{id} | Return all parents, that have this parent as parent +# \\ApiGetAuthProductParentApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| -------------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------- | +| [**product_parents**](ApiGetAuthProductParentApi.md#product_parents) | **GET** /product_parents/ | Return all registered product parents | +| [**product_parents_toplevel**](ApiGetAuthProductParentApi.md#product_parents_toplevel) | **GET** /product_parents_toplevel/ | Return all registered product parents, that have no parents themselves | +| [**product_parents_under**](ApiGetAuthProductParentApi.md#product_parents_under) | **GET** /product_parents_under/{id} | Return all parents, that have this parent as parent | ## product_parents -> Vec<models::ProductParent> product_parents() -Return all registered product parents +> Vec<models::ProductParent> product_parents() Return all registered product +> parents ### Parameters @@ -32,13 +30,15 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_parents_toplevel -> Vec<models::ProductParent> product_parents_toplevel() -Return all registered product parents, that have no parents themselves +> Vec<models::ProductParent> product_parents_toplevel() Return all registered +> product parents, that have no parents themselves ### Parameters @@ -57,20 +57,21 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_parents_under -> Vec<models::ProductParent> product_parents_under(id) -Return all parents, that have this parent as parent +> Vec<models::ProductParent> product_parents_under(id) Return all parents, that +> have this parent as parent ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductParentId**](.md) | Product parent id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------------- | ----------------- | ---------- | ----- | +| **id** | [**ProductParentId**](.md) | Product parent id | [required] | ### Return type @@ -85,5 +86,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthRecipeApi.md b/crates/rocie-client/docs/ApiGetAuthRecipeApi.md index 96d5a77..29e2e36 100644 --- a/crates/rocie-client/docs/ApiGetAuthRecipeApi.md +++ b/crates/rocie-client/docs/ApiGetAuthRecipeApi.md @@ -1,25 +1,21 @@ -# \ApiGetAuthRecipeApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**recipe_by_id**](ApiGetAuthRecipeApi.md#recipe_by_id) | **GET** /recipe/by-id/{id} | Get an recipe by it's id. -[**recipes**](ApiGetAuthRecipeApi.md#recipes) | **GET** /recipe/all | Get all added recipes +# \\ApiGetAuthRecipeApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------- | -------------------------- | ------------------------- | +| [**recipe_by_id**](ApiGetAuthRecipeApi.md#recipe_by_id) | **GET** /recipe/by-id/{id} | Get an recipe by it's id. | +| [**recipes**](ApiGetAuthRecipeApi.md#recipes) | **GET** /recipe/all | Get all added recipes | ## recipe_by_id -> models::Recipe recipe_by_id(id) -Get an recipe by it's id. +> models::Recipe recipe_by_id(id) Get an recipe by it's id. ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**RecipeId**](.md) | Recipe id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ------------------- | ----------- | ---------- | ----- | +| **id** | [**RecipeId**](.md) | Recipe id | [required] | ### Return type @@ -34,13 +30,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## recipes -> models::Recipe recipes() -Get all added recipes +> models::Recipe recipes() Get all added recipes ### Parameters @@ -59,5 +56,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthUnitApi.md b/crates/rocie-client/docs/ApiGetAuthUnitApi.md index 3f2b02f..d8db77d 100644 --- a/crates/rocie-client/docs/ApiGetAuthUnitApi.md +++ b/crates/rocie-client/docs/ApiGetAuthUnitApi.md @@ -1,26 +1,22 @@ -# \ApiGetAuthUnitApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**unit_by_id**](ApiGetAuthUnitApi.md#unit_by_id) | **GET** /unit/{id} | Get Unit by id -[**units**](ApiGetAuthUnitApi.md#units) | **GET** /units/ | Return all registered units -[**units_by_property_id**](ApiGetAuthUnitApi.md#units_by_property_id) | **GET** /units-by-property/{id} | Return all registered units for a specific unit property +# \\ApiGetAuthUnitApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------------------------- | ------------------------------- | -------------------------------------------------------- | +| [**unit_by_id**](ApiGetAuthUnitApi.md#unit_by_id) | **GET** /unit/{id} | Get Unit by id | +| [**units**](ApiGetAuthUnitApi.md#units) | **GET** /units/ | Return all registered units | +| [**units_by_property_id**](ApiGetAuthUnitApi.md#units_by_property_id) | **GET** /units-by-property/{id} | Return all registered units for a specific unit property | ## unit_by_id -> models::Unit unit_by_id(id) -Get Unit by id +> models::Unit unit_by_id(id) Get Unit by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UnitId**](.md) | Unit id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ----------------- | ----------- | ---------- | ----- | +| **id** | [**UnitId**](.md) | Unit id | [required] | ### Return type @@ -35,13 +31,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## units -> Vec<models::Unit> units() -Return all registered units +> Vec<models::Unit> units() Return all registered units ### Parameters @@ -60,20 +57,21 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## units_by_property_id -> Vec<models::Unit> units_by_property_id(id) -Return all registered units for a specific unit property +> Vec<models::Unit> units_by_property_id(id) Return all registered units for a +> specific unit property ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UnitPropertyId**](.md) | Unit property id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ------------------------- | ---------------- | ---------- | ----- | +| **id** | [**UnitPropertyId**](.md) | Unit property id | [required] | ### Return type @@ -88,5 +86,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthUnitPropertyApi.md b/crates/rocie-client/docs/ApiGetAuthUnitPropertyApi.md index d88249a..09c261f 100644 --- a/crates/rocie-client/docs/ApiGetAuthUnitPropertyApi.md +++ b/crates/rocie-client/docs/ApiGetAuthUnitPropertyApi.md @@ -1,18 +1,16 @@ -# \ApiGetAuthUnitPropertyApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**unit_properties**](ApiGetAuthUnitPropertyApi.md#unit_properties) | **GET** /unit-properties/ | Return all registered unit properties -[**unit_property_by_id**](ApiGetAuthUnitPropertyApi.md#unit_property_by_id) | **GET** /unit-property/{id} | Get Unit property by id +# \\ApiGetAuthUnitPropertyApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------------------------------- | --------------------------- | ------------------------------------- | +| [**unit_properties**](ApiGetAuthUnitPropertyApi.md#unit_properties) | **GET** /unit-properties/ | Return all registered unit properties | +| [**unit_property_by_id**](ApiGetAuthUnitPropertyApi.md#unit_property_by_id) | **GET** /unit-property/{id} | Get Unit property by id | ## unit_properties -> Vec<models::UnitProperty> unit_properties() -Return all registered unit properties +> Vec<models::UnitProperty> unit_properties() Return all registered unit +> properties ### Parameters @@ -31,20 +29,20 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## unit_property_by_id -> models::UnitProperty unit_property_by_id(id) -Get Unit property by id +> models::UnitProperty unit_property_by_id(id) Get Unit property by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UnitPropertyId**](.md) | Unit Property id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ------------------------- | ---------------- | ---------- | ----- | +| **id** | [**UnitPropertyId**](.md) | Unit Property id | [required] | ### Return type @@ -59,5 +57,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetAuthUserApi.md b/crates/rocie-client/docs/ApiGetAuthUserApi.md index 653e82a..be9fe70 100644 --- a/crates/rocie-client/docs/ApiGetAuthUserApi.md +++ b/crates/rocie-client/docs/ApiGetAuthUserApi.md @@ -1,25 +1,21 @@ -# \ApiGetAuthUserApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**user_by_id**](ApiGetAuthUserApi.md#user_by_id) | **GET** /user/{id} | Get an specific user by id. -[**users**](ApiGetAuthUserApi.md#users) | **GET** /users | Get all registered users. +# \\ApiGetAuthUserApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------- | ------------------ | --------------------------- | +| [**user_by_id**](ApiGetAuthUserApi.md#user_by_id) | **GET** /user/{id} | Get an specific user by id. | +| [**users**](ApiGetAuthUserApi.md#users) | **GET** /users | Get all registered users. | ## user_by_id -> models::User user_by_id(id) -Get an specific user by id. +> models::User user_by_id(id) Get an specific user by id. ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UserId**](.md) | User id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ----------------- | ----------- | ---------- | ----- | +| **id** | [**UserId**](.md) | User id | [required] | ### Return type @@ -34,13 +30,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## users -> Vec<models::User> users() -Get all registered users. +> Vec<models::User> users() Get all registered users. ### Parameters @@ -59,5 +56,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetInventoryApi.md b/crates/rocie-client/docs/ApiGetInventoryApi.md index 92a53f9..46758a7 100644 --- a/crates/rocie-client/docs/ApiGetInventoryApi.md +++ b/crates/rocie-client/docs/ApiGetInventoryApi.md @@ -1,24 +1,20 @@ -# \ApiGetInventoryApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**amount_by_id**](ApiGetInventoryApi.md#amount_by_id) | **GET** /inventory/{id} | Get the amount of an product +# \\ApiGetInventoryApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------ | ----------------------- | ---------------------------- | +| [**amount_by_id**](ApiGetInventoryApi.md#amount_by_id) | **GET** /inventory/{id} | Get the amount of an product | ## amount_by_id -> models::ProductAmount amount_by_id(id) -Get the amount of an product +> models::ProductAmount amount_by_id(id) Get the amount of an product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductId**](.md) | Product id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------- | ----------- | ---------- | ----- | +| **id** | [**ProductId**](.md) | Product id | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetNoAuthUserApi.md b/crates/rocie-client/docs/ApiGetNoAuthUserApi.md index 7923a1a..d16d158 100644 --- a/crates/rocie-client/docs/ApiGetNoAuthUserApi.md +++ b/crates/rocie-client/docs/ApiGetNoAuthUserApi.md @@ -1,25 +1,21 @@ -# \ApiGetNoAuthUserApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**user_by_id**](ApiGetNoAuthUserApi.md#user_by_id) | **GET** /user/{id} | Get an specific user by id. -[**users**](ApiGetNoAuthUserApi.md#users) | **GET** /users | Get all registered users. +# \\ApiGetNoAuthUserApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------- | ------------------ | --------------------------- | +| [**user_by_id**](ApiGetNoAuthUserApi.md#user_by_id) | **GET** /user/{id} | Get an specific user by id. | +| [**users**](ApiGetNoAuthUserApi.md#users) | **GET** /users | Get all registered users. | ## user_by_id -> models::User user_by_id(id) -Get an specific user by id. +> models::User user_by_id(id) Get an specific user by id. ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UserId**](.md) | User id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ----------------- | ----------- | ---------- | ----- | +| **id** | [**UserId**](.md) | User id | [required] | ### Return type @@ -34,13 +30,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## users -> Vec<models::User> users() -Get all registered users. +> Vec<models::User> users() Get all registered users. ### Parameters @@ -59,5 +56,7 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetProductApi.md b/crates/rocie-client/docs/ApiGetProductApi.md index 3491910..3310f86 100644 --- a/crates/rocie-client/docs/ApiGetProductApi.md +++ b/crates/rocie-client/docs/ApiGetProductApi.md @@ -1,30 +1,26 @@ -# \ApiGetProductApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**product_by_id**](ApiGetProductApi.md#product_by_id) | **GET** /product/by-id/{id} | Get Product by id -[**product_by_name**](ApiGetProductApi.md#product_by_name) | **GET** /product/by-name/{name} | Get Product by name -[**product_suggestion_by_name**](ApiGetProductApi.md#product_suggestion_by_name) | **GET** /product/by-part-name/{name} | Get Product suggestion by name -[**products_by_product_parent_id_direct**](ApiGetProductApi.md#products_by_product_parent_id_direct) | **GET** /product/by-product-parent-id-direct/{id} | Get Products by it's product parent id -[**products_by_product_parent_id_indirect**](ApiGetProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id -[**products_in_storage**](ApiGetProductApi.md#products_in_storage) | **GET** /products_in_storage/ | Return all products, which non-null amount in storage -[**products_registered**](ApiGetProductApi.md#products_registered) | **GET** /products_registered/ | Return all registered products +# \\ApiGetProductApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | ----------------------------------------------------- | +| [**product_by_id**](ApiGetProductApi.md#product_by_id) | **GET** /product/by-id/{id} | Get Product by id | +| [**product_by_name**](ApiGetProductApi.md#product_by_name) | **GET** /product/by-name/{name} | Get Product by name | +| [**product_suggestion_by_name**](ApiGetProductApi.md#product_suggestion_by_name) | **GET** /product/by-part-name/{name} | Get Product suggestion by name | +| [**products_by_product_parent_id_direct**](ApiGetProductApi.md#products_by_product_parent_id_direct) | **GET** /product/by-product-parent-id-direct/{id} | Get Products by it's product parent id | +| [**products_by_product_parent_id_indirect**](ApiGetProductApi.md#products_by_product_parent_id_indirect) | **GET** /product/by-product-parent-id-indirect/{id} | Get Products by it's product parent id | +| [**products_in_storage**](ApiGetProductApi.md#products_in_storage) | **GET** /products_in_storage/ | Return all products, which non-null amount in storage | +| [**products_registered**](ApiGetProductApi.md#products_registered) | **GET** /products_registered/ | Return all registered products | ## product_by_id -> models::Product product_by_id(id) -Get Product by id +> models::Product product_by_id(id) Get Product by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductId**](.md) | Product id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------- | ----------- | ---------- | ----- | +| **id** | [**ProductId**](.md) | Product id | [required] | ### Return type @@ -39,20 +35,20 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_by_name -> models::Product product_by_name(name) -Get Product by name +> models::Product product_by_name(name) Get Product by name ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | Name of the product | [required] | +| Name | Type | Description | Required | Notes | +| -------- | ---------- | ------------------- | ---------- | ----- | +| **name** | **String** | Name of the product | [required] | ### Return type @@ -67,20 +63,21 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_suggestion_by_name -> Vec<models::Product> product_suggestion_by_name(name) -Get Product suggestion by name +> Vec<models::Product> product_suggestion_by_name(name) Get Product suggestion +> by name ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**name** | **String** | Partial name of a product | [required] | +| Name | Type | Description | Required | Notes | +| -------- | ---------- | ------------------------- | ---------- | ----- | +| **name** | **String** | Partial name of a product | [required] | ### Return type @@ -95,22 +92,23 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_by_product_parent_id_direct -> Vec<models::Product> products_by_product_parent_id_direct(id) -Get Products by it's product parent id +> Vec<models::Product> products_by_product_parent_id_direct(id) Get Products by +> it's product parent id This will only return products directly associated with this product parent id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductParentId**](.md) | Product parent id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------------- | ----------------- | ---------- | ----- | +| **id** | [**ProductParentId**](.md) | Product parent id | [required] | ### Return type @@ -125,22 +123,23 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_by_product_parent_id_indirect -> Vec<models::Product> products_by_product_parent_id_indirect(id) -Get Products by it's product parent id +> Vec<models::Product> products_by_product_parent_id_indirect(id) Get Products +> by it's product parent id This will also return all products below this product parent id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductParentId**](.md) | Product parent id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------------- | ----------------- | ---------- | ----- | +| **id** | [**ProductParentId**](.md) | Product parent id | [required] | ### Return type @@ -155,13 +154,15 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_in_storage -> Vec<models::Product> products_in_storage() -Return all products, which non-null amount in storage +> Vec<models::Product> products_in_storage() Return all products, which non-null +> amount in storage ### Parameters @@ -180,13 +181,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## products_registered -> Vec<models::Product> products_registered() -Return all registered products +> Vec<models::Product> products_registered() Return all registered products ### Parameters @@ -205,5 +207,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetProductParentApi.md b/crates/rocie-client/docs/ApiGetProductParentApi.md index 3c61982..60aafd1 100644 --- a/crates/rocie-client/docs/ApiGetProductParentApi.md +++ b/crates/rocie-client/docs/ApiGetProductParentApi.md @@ -1,19 +1,17 @@ -# \ApiGetProductParentApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**product_parents**](ApiGetProductParentApi.md#product_parents) | **GET** /product_parents/ | Return all registered product parents -[**product_parents_toplevel**](ApiGetProductParentApi.md#product_parents_toplevel) | **GET** /product_parents_toplevel/ | Return all registered product parents, that have no parents themselves -[**product_parents_under**](ApiGetProductParentApi.md#product_parents_under) | **GET** /product_parents_under/{id} | Return all parents, that have this parent as parent +# \\ApiGetProductParentApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ---------------------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------- | +| [**product_parents**](ApiGetProductParentApi.md#product_parents) | **GET** /product_parents/ | Return all registered product parents | +| [**product_parents_toplevel**](ApiGetProductParentApi.md#product_parents_toplevel) | **GET** /product_parents_toplevel/ | Return all registered product parents, that have no parents themselves | +| [**product_parents_under**](ApiGetProductParentApi.md#product_parents_under) | **GET** /product_parents_under/{id} | Return all parents, that have this parent as parent | ## product_parents -> Vec<models::ProductParent> product_parents() -Return all registered product parents +> Vec<models::ProductParent> product_parents() Return all registered product +> parents ### Parameters @@ -32,13 +30,15 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_parents_toplevel -> Vec<models::ProductParent> product_parents_toplevel() -Return all registered product parents, that have no parents themselves +> Vec<models::ProductParent> product_parents_toplevel() Return all registered +> product parents, that have no parents themselves ### Parameters @@ -57,20 +57,21 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## product_parents_under -> Vec<models::ProductParent> product_parents_under(id) -Return all parents, that have this parent as parent +> Vec<models::ProductParent> product_parents_under(id) Return all parents, that +> have this parent as parent ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductParentId**](.md) | Product parent id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | -------------------------- | ----------------- | ---------- | ----- | +| **id** | [**ProductParentId**](.md) | Product parent id | [required] | ### Return type @@ -85,5 +86,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetRecipeApi.md b/crates/rocie-client/docs/ApiGetRecipeApi.md index cce6112..677dff5 100644 --- a/crates/rocie-client/docs/ApiGetRecipeApi.md +++ b/crates/rocie-client/docs/ApiGetRecipeApi.md @@ -1,25 +1,21 @@ -# \ApiGetRecipeApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**recipe_by_id**](ApiGetRecipeApi.md#recipe_by_id) | **GET** /recipe/by-id/{id} | Get an recipe by it's id. -[**recipes**](ApiGetRecipeApi.md#recipes) | **GET** /recipe/all | Get all added recipes +# \\ApiGetRecipeApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------- | -------------------------- | ------------------------- | +| [**recipe_by_id**](ApiGetRecipeApi.md#recipe_by_id) | **GET** /recipe/by-id/{id} | Get an recipe by it's id. | +| [**recipes**](ApiGetRecipeApi.md#recipes) | **GET** /recipe/all | Get all added recipes | ## recipe_by_id -> models::Recipe recipe_by_id(id) -Get an recipe by it's id. +> models::Recipe recipe_by_id(id) Get an recipe by it's id. ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**RecipeId**](.md) | Recipe id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ------------------- | ----------- | ---------- | ----- | +| **id** | [**RecipeId**](.md) | Recipe id | [required] | ### Return type @@ -34,13 +30,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## recipes -> models::Recipe recipes() -Get all added recipes +> models::Recipe recipes() Get all added recipes ### Parameters @@ -59,5 +56,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetUnitApi.md b/crates/rocie-client/docs/ApiGetUnitApi.md index f2fc6e6..b2e7311 100644 --- a/crates/rocie-client/docs/ApiGetUnitApi.md +++ b/crates/rocie-client/docs/ApiGetUnitApi.md @@ -1,26 +1,22 @@ -# \ApiGetUnitApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**unit_by_id**](ApiGetUnitApi.md#unit_by_id) | **GET** /unit/{id} | Get Unit by id -[**units**](ApiGetUnitApi.md#units) | **GET** /units/ | Return all registered units -[**units_by_property_id**](ApiGetUnitApi.md#units_by_property_id) | **GET** /units-by-property/{id} | Return all registered units for a specific unit property +# \\ApiGetUnitApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------------------------- | ------------------------------- | -------------------------------------------------------- | +| [**unit_by_id**](ApiGetUnitApi.md#unit_by_id) | **GET** /unit/{id} | Get Unit by id | +| [**units**](ApiGetUnitApi.md#units) | **GET** /units/ | Return all registered units | +| [**units_by_property_id**](ApiGetUnitApi.md#units_by_property_id) | **GET** /units-by-property/{id} | Return all registered units for a specific unit property | ## unit_by_id -> models::Unit unit_by_id(id) -Get Unit by id +> models::Unit unit_by_id(id) Get Unit by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UnitId**](.md) | Unit id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ----------------- | ----------- | ---------- | ----- | +| **id** | [**UnitId**](.md) | Unit id | [required] | ### Return type @@ -35,13 +31,14 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## units -> Vec<models::Unit> units() -Return all registered units +> Vec<models::Unit> units() Return all registered units ### Parameters @@ -60,20 +57,21 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## units_by_property_id -> Vec<models::Unit> units_by_property_id(id) -Return all registered units for a specific unit property +> Vec<models::Unit> units_by_property_id(id) Return all registered units for a +> specific unit property ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UnitPropertyId**](.md) | Unit property id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ------------------------- | ---------------- | ---------- | ----- | +| **id** | [**UnitPropertyId**](.md) | Unit property id | [required] | ### Return type @@ -88,5 +86,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiGetUnitPropertyApi.md b/crates/rocie-client/docs/ApiGetUnitPropertyApi.md index e59d876..da8f68e 100644 --- a/crates/rocie-client/docs/ApiGetUnitPropertyApi.md +++ b/crates/rocie-client/docs/ApiGetUnitPropertyApi.md @@ -1,18 +1,16 @@ -# \ApiGetUnitPropertyApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**unit_properties**](ApiGetUnitPropertyApi.md#unit_properties) | **GET** /unit-properties/ | Return all registered unit properties -[**unit_property_by_id**](ApiGetUnitPropertyApi.md#unit_property_by_id) | **GET** /unit-property/{id} | Get Unit property by id +# \\ApiGetUnitPropertyApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------------------------------- | --------------------------- | ------------------------------------- | +| [**unit_properties**](ApiGetUnitPropertyApi.md#unit_properties) | **GET** /unit-properties/ | Return all registered unit properties | +| [**unit_property_by_id**](ApiGetUnitPropertyApi.md#unit_property_by_id) | **GET** /unit-property/{id} | Get Unit property by id | ## unit_properties -> Vec<models::UnitProperty> unit_properties() -Return all registered unit properties +> Vec<models::UnitProperty> unit_properties() Return all registered unit +> properties ### Parameters @@ -31,20 +29,20 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## unit_property_by_id -> models::UnitProperty unit_property_by_id(id) -Get Unit property by id +> models::UnitProperty unit_property_by_id(id) Get Unit property by id ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**UnitPropertyId**](.md) | Unit Property id | [required] | +| Name | Type | Description | Required | Notes | +| ------ | ------------------------- | ---------------- | ---------- | ----- | +| **id** | [**UnitPropertyId**](.md) | Unit Property id | [required] | ### Return type @@ -59,5 +57,7 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetApi.md b/crates/rocie-client/docs/ApiSetApi.md index 6129e50..21f6c35 100644 --- a/crates/rocie-client/docs/ApiSetApi.md +++ b/crates/rocie-client/docs/ApiSetApi.md @@ -1,30 +1,26 @@ -# \ApiSetApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**associate_barcode**](ApiSetApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product -[**register_product**](ApiSetApi.md#register_product) | **POST** /product/new | Register a product +# \\ApiSetApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------- | -------------------------------- | ---------------------------------- | +| [**associate_barcode**](ApiSetApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product | +| [**register_product**](ApiSetApi.md#register_product) | **POST** /product/new | Register a product | ## associate_barcode -> associate_barcode(id, barcode) -Associate a barcode with a product +> associate_barcode(id, barcode) Associate a barcode with a product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **uuid::Uuid** | The id of the product to associated the barcode with | [required] | -**barcode** | [**Barcode**](Barcode.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ----------- | ------------------------- | ---------------------------------------------------- | ---------- | ----- | +| **id** | **uuid::Uuid** | The id of the product to associated the barcode with | [required] | +| **barcode** | [**Barcode**](Barcode.md) | | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -35,20 +31,20 @@ No authorization required - **Content-Type**: application/json - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## register_product -> uuid::Uuid register_product(product_stub) -Register a product +> uuid::Uuid register_product(product_stub) Register a product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**product_stub** | [**ProductStub**](ProductStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ---------------- | --------------------------------- | ----------- | ---------- | ----- | +| **product_stub** | [**ProductStub**](ProductStub.md) | | [required] | ### Return type @@ -63,5 +59,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthBarcodeApi.md b/crates/rocie-client/docs/ApiSetAuthBarcodeApi.md index 535643b..357c26b 100644 --- a/crates/rocie-client/docs/ApiSetAuthBarcodeApi.md +++ b/crates/rocie-client/docs/ApiSetAuthBarcodeApi.md @@ -1,30 +1,26 @@ -# \ApiSetAuthBarcodeApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**buy_barcode**](ApiSetAuthBarcodeApi.md#buy_barcode) | **POST** /barcode/{barcode_id}/buy/{times} | Buy an barcode -[**consume_barcode**](ApiSetAuthBarcodeApi.md#consume_barcode) | **POST** /barcode/{id}/consume | Consume an barcode +# \\ApiSetAuthBarcodeApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| -------------------------------------------------------------- | ------------------------------------------ | ------------------ | +| [**buy_barcode**](ApiSetAuthBarcodeApi.md#buy_barcode) | **POST** /barcode/{barcode_id}/buy/{times} | Buy an barcode | +| [**consume_barcode**](ApiSetAuthBarcodeApi.md#consume_barcode) | **POST** /barcode/{id}/consume | Consume an barcode | ## buy_barcode -> buy_barcode(barcode_id, times) -Buy an barcode +> buy_barcode(barcode_id, times) Buy an barcode ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**barcode_id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | -**times** | **u32** | How often to buy the barcode | [required] | +| Name | Type | Description | Required | Notes | +| -------------- | -------------------- | -------------------------------- | ---------- | ----- | +| **barcode_id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | +| **times** | **u32** | How often to buy the barcode | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -35,25 +31,25 @@ No authorization required - **Content-Type**: Not defined - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## consume_barcode -> consume_barcode(id, unit_amount) -Consume an barcode +> consume_barcode(id, unit_amount) Consume an barcode ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | -**unit_amount** | [**UnitAmount**](UnitAmount.md) | | [required] | +| Name | Type | Description | Required | Notes | +| --------------- | ------------------------------- | -------------------------------- | ---------- | ----- | +| **id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | +| **unit_amount** | [**UnitAmount**](UnitAmount.md) | | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -64,5 +60,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthProductApi.md b/crates/rocie-client/docs/ApiSetAuthProductApi.md index eb52b59..df659ef 100644 --- a/crates/rocie-client/docs/ApiSetAuthProductApi.md +++ b/crates/rocie-client/docs/ApiSetAuthProductApi.md @@ -1,30 +1,26 @@ -# \ApiSetAuthProductApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**associate_barcode**](ApiSetAuthProductApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product -[**register_product**](ApiSetAuthProductApi.md#register_product) | **POST** /product/new | Register a product +# \\ApiSetAuthProductApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------------------ | -------------------------------- | ---------------------------------- | +| [**associate_barcode**](ApiSetAuthProductApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product | +| [**register_product**](ApiSetAuthProductApi.md#register_product) | **POST** /product/new | Register a product | ## associate_barcode -> associate_barcode(id, barcode) -Associate a barcode with a product +> associate_barcode(id, barcode) Associate a barcode with a product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductId**](.md) | The id of the product to associated the barcode with | [required] | -**barcode** | [**Barcode**](Barcode.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ----------- | ------------------------- | ---------------------------------------------------- | ---------- | ----- | +| **id** | [**ProductId**](.md) | The id of the product to associated the barcode with | [required] | +| **barcode** | [**Barcode**](Barcode.md) | | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -35,20 +31,20 @@ No authorization required - **Content-Type**: application/json - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## register_product -> models::ProductId register_product(product_stub) -Register a product +> models::ProductId register_product(product_stub) Register a product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**product_stub** | [**ProductStub**](ProductStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ---------------- | --------------------------------- | ----------- | ---------- | ----- | +| **product_stub** | [**ProductStub**](ProductStub.md) | | [required] | ### Return type @@ -63,5 +59,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthProductParentApi.md b/crates/rocie-client/docs/ApiSetAuthProductParentApi.md index e48c269..54fbef1 100644 --- a/crates/rocie-client/docs/ApiSetAuthProductParentApi.md +++ b/crates/rocie-client/docs/ApiSetAuthProductParentApi.md @@ -1,24 +1,21 @@ -# \ApiSetAuthProductParentApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_product_parent**](ApiSetAuthProductParentApi.md#register_product_parent) | **POST** /product_parent/new | Register a product parent +# \\ApiSetAuthProductParentApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------------------------------------ | ---------------------------- | ------------------------- | +| [**register_product_parent**](ApiSetAuthProductParentApi.md#register_product_parent) | **POST** /product_parent/new | Register a product parent | ## register_product_parent -> models::ProductParentId register_product_parent(product_parent_stub) -Register a product parent +> models::ProductParentId register_product_parent(product_parent_stub) Register +> a product parent ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**product_parent_stub** | [**ProductParentStub**](ProductParentStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ----------------------- | --------------------------------------------- | ----------- | ---------- | ----- | +| **product_parent_stub** | [**ProductParentStub**](ProductParentStub.md) | | [required] | ### Return type @@ -33,5 +30,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthRecipeApi.md b/crates/rocie-client/docs/ApiSetAuthRecipeApi.md index 0ec118b..a897210 100644 --- a/crates/rocie-client/docs/ApiSetAuthRecipeApi.md +++ b/crates/rocie-client/docs/ApiSetAuthRecipeApi.md @@ -1,24 +1,20 @@ -# \ApiSetAuthRecipeApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_recipe**](ApiSetAuthRecipeApi.md#add_recipe) | **POST** /recipe/new | Register a product parent +# \\ApiSetAuthRecipeApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------- | -------------------- | ------------------------- | +| [**add_recipe**](ApiSetAuthRecipeApi.md#add_recipe) | **POST** /recipe/new | Register a product parent | ## add_recipe -> models::RecipeId add_recipe(recipe_stub) -Register a product parent +> models::RecipeId add_recipe(recipe_stub) Register a product parent ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**recipe_stub** | [**RecipeStub**](RecipeStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| --------------- | ------------------------------- | ----------- | ---------- | ----- | +| **recipe_stub** | [**RecipeStub**](RecipeStub.md) | | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthUnitApi.md b/crates/rocie-client/docs/ApiSetAuthUnitApi.md index d5927f8..ddb7581 100644 --- a/crates/rocie-client/docs/ApiSetAuthUnitApi.md +++ b/crates/rocie-client/docs/ApiSetAuthUnitApi.md @@ -1,24 +1,20 @@ -# \ApiSetAuthUnitApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_unit**](ApiSetAuthUnitApi.md#register_unit) | **POST** /unit/new | Register an Unit +# \\ApiSetAuthUnitApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------- | ------------------ | ---------------- | +| [**register_unit**](ApiSetAuthUnitApi.md#register_unit) | **POST** /unit/new | Register an Unit | ## register_unit -> models::UnitId register_unit(unit_stub) -Register an Unit +> models::UnitId register_unit(unit_stub) Register an Unit ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**unit_stub** | [**UnitStub**](UnitStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ------------- | --------------------------- | ----------- | ---------- | ----- | +| **unit_stub** | [**UnitStub**](UnitStub.md) | | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthUnitPropertyApi.md b/crates/rocie-client/docs/ApiSetAuthUnitPropertyApi.md index 855065c..df662c8 100644 --- a/crates/rocie-client/docs/ApiSetAuthUnitPropertyApi.md +++ b/crates/rocie-client/docs/ApiSetAuthUnitPropertyApi.md @@ -1,24 +1,21 @@ -# \ApiSetAuthUnitPropertyApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_unit_property**](ApiSetAuthUnitPropertyApi.md#register_unit_property) | **POST** /unit-property/new | Register an Unit Property +# \\ApiSetAuthUnitPropertyApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------------------------------------- | --------------------------- | ------------------------- | +| [**register_unit_property**](ApiSetAuthUnitPropertyApi.md#register_unit_property) | **POST** /unit-property/new | Register an Unit Property | ## register_unit_property -> models::UnitPropertyId register_unit_property(unit_property_stub) -Register an Unit Property +> models::UnitPropertyId register_unit_property(unit_property_stub) Register an +> Unit Property ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**unit_property_stub** | [**UnitPropertyStub**](UnitPropertyStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ---------------------- | ------------------------------------------- | ----------- | ---------- | ----- | +| **unit_property_stub** | [**UnitPropertyStub**](UnitPropertyStub.md) | | [required] | ### Return type @@ -33,5 +30,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetAuthUserApi.md b/crates/rocie-client/docs/ApiSetAuthUserApi.md index 7409a8a..77bdd60 100644 --- a/crates/rocie-client/docs/ApiSetAuthUserApi.md +++ b/crates/rocie-client/docs/ApiSetAuthUserApi.md @@ -1,24 +1,20 @@ -# \ApiSetAuthUserApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_user**](ApiSetAuthUserApi.md#register_user) | **POST** /user/new | Register an new User +# \\ApiSetAuthUserApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------------- | ------------------ | -------------------- | +| [**register_user**](ApiSetAuthUserApi.md#register_user) | **POST** /user/new | Register an new User | ## register_user -> models::UserId register_user(user_stub) -Register an new User +> models::UserId register_user(user_stub) Register an new User ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_stub** | [**UserStub**](UserStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ------------- | --------------------------- | ----------- | ---------- | ----- | +| **user_stub** | [**UserStub**](UserStub.md) | | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetBarcodeApi.md b/crates/rocie-client/docs/ApiSetBarcodeApi.md index 905a299..f3e8e3f 100644 --- a/crates/rocie-client/docs/ApiSetBarcodeApi.md +++ b/crates/rocie-client/docs/ApiSetBarcodeApi.md @@ -1,30 +1,26 @@ -# \ApiSetBarcodeApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**buy_barcode**](ApiSetBarcodeApi.md#buy_barcode) | **POST** /barcode/{barcode_id}/buy/{times} | Buy an barcode -[**consume_barcode**](ApiSetBarcodeApi.md#consume_barcode) | **POST** /barcode/{id}/consume | Consume an barcode +# \\ApiSetBarcodeApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ---------------------------------------------------------- | ------------------------------------------ | ------------------ | +| [**buy_barcode**](ApiSetBarcodeApi.md#buy_barcode) | **POST** /barcode/{barcode_id}/buy/{times} | Buy an barcode | +| [**consume_barcode**](ApiSetBarcodeApi.md#consume_barcode) | **POST** /barcode/{id}/consume | Consume an barcode | ## buy_barcode -> buy_barcode(barcode_id, times) -Buy an barcode +> buy_barcode(barcode_id, times) Buy an barcode ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**barcode_id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | -**times** | **u32** | How often to buy the barcode | [required] | +| Name | Type | Description | Required | Notes | +| -------------- | -------------------- | -------------------------------- | ---------- | ----- | +| **barcode_id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | +| **times** | **u32** | How often to buy the barcode | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -35,25 +31,25 @@ No authorization required - **Content-Type**: Not defined - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## consume_barcode -> consume_barcode(id, unit_amount) -Consume an barcode +> consume_barcode(id, unit_amount) Consume an barcode ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | -**unit_amount** | [**UnitAmount**](UnitAmount.md) | | [required] | +| Name | Type | Description | Required | Notes | +| --------------- | ------------------------------- | -------------------------------- | ---------- | ----- | +| **id** | [**BarcodeId**](.md) | The numeric value of the barcode | [required] | +| **unit_amount** | [**UnitAmount**](UnitAmount.md) | | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -64,5 +60,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetNoAuthUserApi.md b/crates/rocie-client/docs/ApiSetNoAuthUserApi.md index f532533..4cfc846 100644 --- a/crates/rocie-client/docs/ApiSetNoAuthUserApi.md +++ b/crates/rocie-client/docs/ApiSetNoAuthUserApi.md @@ -1,30 +1,26 @@ -# \ApiSetNoAuthUserApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**login**](ApiSetNoAuthUserApi.md#login) | **POST** /login | Log in as a specific user -[**logout**](ApiSetNoAuthUserApi.md#logout) | **POST** /logout | Log the current user out -[**provision**](ApiSetNoAuthUserApi.md#provision) | **POST** /provision | Provision this instance. +# \\ApiSetNoAuthUserApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ------------------------------------------------- | ------------------- | ------------------------- | +| [**login**](ApiSetNoAuthUserApi.md#login) | **POST** /login | Log in as a specific user | +| [**logout**](ApiSetNoAuthUserApi.md#logout) | **POST** /logout | Log the current user out | +| [**provision**](ApiSetNoAuthUserApi.md#provision) | **POST** /provision | Provision this instance. | ## login -> login(login_info) -Log in as a specific user +> login(login_info) Log in as a specific user ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**login_info** | [**LoginInfo**](LoginInfo.md) | | [required] | +| Name | Type | Description | Required | Notes | +| -------------- | ----------------------------- | ----------- | ---------- | ----- | +| **login_info** | [**LoginInfo**](LoginInfo.md) | | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -35,13 +31,14 @@ No authorization required - **Content-Type**: application/json - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## logout -> logout() -Log the current user out +> logout() Log the current user out ### Parameters @@ -49,7 +46,7 @@ This endpoint does not need any parameter. ### Return type - (empty response body) +(empty response body) ### Authorization @@ -60,22 +57,22 @@ No authorization required - **Content-Type**: Not defined - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## provision -> models::UserId provision(user_stub) -Provision this instance. +> models::UserId provision(user_stub) Provision this instance. This only works, if no users exist yet. ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**user_stub** | [**UserStub**](UserStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ------------- | --------------------------- | ----------- | ---------- | ----- | +| **user_stub** | [**UserStub**](UserStub.md) | | [required] | ### Return type @@ -90,5 +87,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetProductApi.md b/crates/rocie-client/docs/ApiSetProductApi.md index bb4ca4e..7b4ee8a 100644 --- a/crates/rocie-client/docs/ApiSetProductApi.md +++ b/crates/rocie-client/docs/ApiSetProductApi.md @@ -1,30 +1,26 @@ -# \ApiSetProductApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**associate_barcode**](ApiSetProductApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product -[**register_product**](ApiSetProductApi.md#register_product) | **POST** /product/new | Register a product +# \\ApiSetProductApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| -------------------------------------------------------------- | -------------------------------- | ---------------------------------- | +| [**associate_barcode**](ApiSetProductApi.md#associate_barcode) | **POST** /product/{id}/associate | Associate a barcode with a product | +| [**register_product**](ApiSetProductApi.md#register_product) | **POST** /product/new | Register a product | ## associate_barcode -> associate_barcode(id, barcode) -Associate a barcode with a product +> associate_barcode(id, barcode) Associate a barcode with a product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | [**ProductId**](.md) | The id of the product to associated the barcode with | [required] | -**barcode** | [**Barcode**](Barcode.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ----------- | ------------------------- | ---------------------------------------------------- | ---------- | ----- | +| **id** | [**ProductId**](.md) | The id of the product to associated the barcode with | [required] | +| **barcode** | [**Barcode**](Barcode.md) | | [required] | ### Return type - (empty response body) +(empty response body) ### Authorization @@ -35,20 +31,20 @@ No authorization required - **Content-Type**: application/json - **Accept**: text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) ## register_product -> models::ProductId register_product(product_stub) -Register a product +> models::ProductId register_product(product_stub) Register a product ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**product_stub** | [**ProductStub**](ProductStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ---------------- | --------------------------------- | ----------- | ---------- | ----- | +| **product_stub** | [**ProductStub**](ProductStub.md) | | [required] | ### Return type @@ -63,5 +59,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetProductParentApi.md b/crates/rocie-client/docs/ApiSetProductParentApi.md index 116175c..56caecb 100644 --- a/crates/rocie-client/docs/ApiSetProductParentApi.md +++ b/crates/rocie-client/docs/ApiSetProductParentApi.md @@ -1,24 +1,21 @@ -# \ApiSetProductParentApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_product_parent**](ApiSetProductParentApi.md#register_product_parent) | **POST** /product_parent/new | Register a product parent +# \\ApiSetProductParentApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| -------------------------------------------------------------------------------- | ---------------------------- | ------------------------- | +| [**register_product_parent**](ApiSetProductParentApi.md#register_product_parent) | **POST** /product_parent/new | Register a product parent | ## register_product_parent -> models::ProductParentId register_product_parent(product_parent_stub) -Register a product parent +> models::ProductParentId register_product_parent(product_parent_stub) Register +> a product parent ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**product_parent_stub** | [**ProductParentStub**](ProductParentStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ----------------------- | --------------------------------------------- | ----------- | ---------- | ----- | +| **product_parent_stub** | [**ProductParentStub**](ProductParentStub.md) | | [required] | ### Return type @@ -33,5 +30,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetRecipeApi.md b/crates/rocie-client/docs/ApiSetRecipeApi.md index 00f2670..96f77fa 100644 --- a/crates/rocie-client/docs/ApiSetRecipeApi.md +++ b/crates/rocie-client/docs/ApiSetRecipeApi.md @@ -1,24 +1,20 @@ -# \ApiSetRecipeApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_recipe**](ApiSetRecipeApi.md#add_recipe) | **POST** /recipe/new | Register a product parent +# \\ApiSetRecipeApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------- | -------------------- | ------------------------- | +| [**add_recipe**](ApiSetRecipeApi.md#add_recipe) | **POST** /recipe/new | Register a product parent | ## add_recipe -> models::RecipeId add_recipe(recipe_stub) -Register a product parent +> models::RecipeId add_recipe(recipe_stub) Register a product parent ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**recipe_stub** | [**RecipeStub**](RecipeStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| --------------- | ------------------------------- | ----------- | ---------- | ----- | +| **recipe_stub** | [**RecipeStub**](RecipeStub.md) | | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetUnitApi.md b/crates/rocie-client/docs/ApiSetUnitApi.md index ebe8e5c..e657e3a 100644 --- a/crates/rocie-client/docs/ApiSetUnitApi.md +++ b/crates/rocie-client/docs/ApiSetUnitApi.md @@ -1,24 +1,20 @@ -# \ApiSetUnitApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_unit**](ApiSetUnitApi.md#register_unit) | **POST** /unit/new | Register an Unit +# \\ApiSetUnitApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| --------------------------------------------------- | ------------------ | ---------------- | +| [**register_unit**](ApiSetUnitApi.md#register_unit) | **POST** /unit/new | Register an Unit | ## register_unit -> models::UnitId register_unit(unit_stub) -Register an Unit +> models::UnitId register_unit(unit_stub) Register an Unit ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**unit_stub** | [**UnitStub**](UnitStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ------------- | --------------------------- | ----------- | ---------- | ----- | +| **unit_stub** | [**UnitStub**](UnitStub.md) | | [required] | ### Return type @@ -33,5 +29,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ApiSetUnitPropertyApi.md b/crates/rocie-client/docs/ApiSetUnitPropertyApi.md index b54aec1..af7cf41 100644 --- a/crates/rocie-client/docs/ApiSetUnitPropertyApi.md +++ b/crates/rocie-client/docs/ApiSetUnitPropertyApi.md @@ -1,24 +1,21 @@ -# \ApiSetUnitPropertyApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**register_unit_property**](ApiSetUnitPropertyApi.md#register_unit_property) | **POST** /unit-property/new | Register an Unit Property +# \\ApiSetUnitPropertyApi +All URIs are relative to _http://localhost_ +| Method | HTTP request | Description | +| ----------------------------------------------------------------------------- | --------------------------- | ------------------------- | +| [**register_unit_property**](ApiSetUnitPropertyApi.md#register_unit_property) | **POST** /unit-property/new | Register an Unit Property | ## register_unit_property -> models::UnitPropertyId register_unit_property(unit_property_stub) -Register an Unit Property +> models::UnitPropertyId register_unit_property(unit_property_stub) Register an +> Unit Property ### Parameters - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**unit_property_stub** | [**UnitPropertyStub**](UnitPropertyStub.md) | | [required] | +| Name | Type | Description | Required | Notes | +| ---------------------- | ------------------------------------------- | ----------- | ---------- | ----- | +| **unit_property_stub** | [**UnitPropertyStub**](UnitPropertyStub.md) | | [required] | ### Return type @@ -33,5 +30,7 @@ No authorization required - **Content-Type**: application/json - **Accept**: application/json, text/plain -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - +[[Back to top]](#) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/BarCode.md b/crates/rocie-client/docs/BarCode.md index 8c58cb3..7d3afd5 100644 --- a/crates/rocie-client/docs/BarCode.md +++ b/crates/rocie-client/docs/BarCode.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **i64** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| ------ | ------- | ----------- | ----- | +| **id** | **i64** | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/Barcode.md b/crates/rocie-client/docs/Barcode.md index 622b82d..7d84458 100644 --- a/crates/rocie-client/docs/Barcode.md +++ b/crates/rocie-client/docs/Barcode.md @@ -2,11 +2,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | [**models::UnitAmount**](UnitAmount.md) | | -**id** | [**models::BarcodeId**](BarcodeId.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ---------- | --------------------------------------- | ----------- | ----- | +| **amount** | [**models::UnitAmount**](UnitAmount.md) | | +| **id** | [**models::BarcodeId**](BarcodeId.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/BarcodeId.md b/crates/rocie-client/docs/BarcodeId.md index 630e07f..b180bd9 100644 --- a/crates/rocie-client/docs/BarcodeId.md +++ b/crates/rocie-client/docs/BarcodeId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **u32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------- | ----------- | ----- | +| **value** | **u32** | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/LoginInfo.md b/crates/rocie-client/docs/LoginInfo.md index 699a685..97c02c4 100644 --- a/crates/rocie-client/docs/LoginInfo.md +++ b/crates/rocie-client/docs/LoginInfo.md @@ -2,11 +2,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | [**models::UserId**](UserId.md) | The id of the user. | -**password** | **String** | The password of the user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ------------ | ------------------------------- | ------------------------- | ----- | +| **id** | [**models::UserId**](UserId.md) | The id of the user. | +| **password** | **String** | The password of the user. | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/PasswordHash.md b/crates/rocie-client/docs/PasswordHash.md index ac022d2..208e234 100644 --- a/crates/rocie-client/docs/PasswordHash.md +++ b/crates/rocie-client/docs/PasswordHash.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ---------- | ----------- | ----- | +| **value** | **String** | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/Product.md b/crates/rocie-client/docs/Product.md index 83536ff..7e4bdf6 100644 --- a/crates/rocie-client/docs/Product.md +++ b/crates/rocie-client/docs/Product.md @@ -2,15 +2,15 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**associated_bar_codes** | [**Vec<models::Barcode>**](Barcode.md) | Which barcodes are associated with this product. | -**description** | Option<**String**> | An optional description of this product. | [optional] -**id** | [**models::ProductId**](ProductId.md) | The id of the product. | -**name** | **String** | The name of the product. This should be globally unique, to make searching easier for the user. | -**parent** | Option<[**models::ProductParentId**](ProductParentId.md)> | The parent this product has. This is effectively it's anchor in the product DAG. | [optional] -**unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | The property this product is measured in. (This is probably always either Mass, Volume or Quantity). | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| ------------------------ | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------- | +| **associated_bar_codes** | [**Vec<models::Barcode>**](Barcode.md) | Which barcodes are associated with this product. | +| **description** | Option\<**String**> | An optional description of this product. | [optional] | +| **id** | [**models::ProductId**](ProductId.md) | The id of the product. | +| **name** | **String** | The name of the product. This should be globally unique, to make searching easier for the user. | +| **parent** | Option\<[**models::ProductParentId**](ProductParentId.md)> | The parent this product has. This is effectively it's anchor in the product DAG. | [optional] | +| **unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | The property this product is measured in. (This is probably always either Mass, Volume or Quantity). | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductAmount.md b/crates/rocie-client/docs/ProductAmount.md index ac5d9cc..7a841bf 100644 --- a/crates/rocie-client/docs/ProductAmount.md +++ b/crates/rocie-client/docs/ProductAmount.md @@ -2,11 +2,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**amount** | [**models::UnitAmount**](UnitAmount.md) | | -**product_id** | [**models::ProductId**](ProductId.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| -------------- | --------------------------------------- | ----------- | ----- | +| **amount** | [**models::UnitAmount**](UnitAmount.md) | | +| **product_id** | [**models::ProductId**](ProductId.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductId.md b/crates/rocie-client/docs/ProductId.md index 90dc866..af4e0a9 100644 --- a/crates/rocie-client/docs/ProductId.md +++ b/crates/rocie-client/docs/ProductId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**uuid::Uuid**](uuid::Uuid.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **value** | [**uuid::Uuid**](uuid::Uuid.md) | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductOneOf.md b/crates/rocie-client/docs/ProductOneOf.md index 1ab44aa..cd45cc7 100644 --- a/crates/rocie-client/docs/ProductOneOf.md +++ b/crates/rocie-client/docs/ProductOneOf.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mass** | **i64** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| -------- | ------- | ----------- | ----- | +| **mass** | **i64** | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductOneOf1.md b/crates/rocie-client/docs/ProductOneOf1.md index f395a25..10b5205 100644 --- a/crates/rocie-client/docs/ProductOneOf1.md +++ b/crates/rocie-client/docs/ProductOneOf1.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**volume** | **i64** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| ---------- | ------- | ----------- | ----- | +| **volume** | **i64** | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductParent.md b/crates/rocie-client/docs/ProductParent.md index a63384b..8cb0028 100644 --- a/crates/rocie-client/docs/ProductParent.md +++ b/crates/rocie-client/docs/ProductParent.md @@ -2,13 +2,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | An optional description of this product parent. | [optional] -**id** | [**models::ProductParentId**](ProductParentId.md) | The id of the product parent. | -**name** | **String** | The name of the product parent. This should be globally unique, to make searching easier for the user. | -**parent** | Option<[**models::ProductParentId**](ProductParentId.md)> | The optional id of the parent of this product parent. This must not form a cycle. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| --------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------- | +| **description** | Option\<**String**> | An optional description of this product parent. | [optional] | +| **id** | [**models::ProductParentId**](ProductParentId.md) | The id of the product parent. | +| **name** | **String** | The name of the product parent. This should be globally unique, to make searching easier for the user. | +| **parent** | Option\<[**models::ProductParentId**](ProductParentId.md)> | The optional id of the parent of this product parent. This must not form a cycle. | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductParentId.md b/crates/rocie-client/docs/ProductParentId.md index c9163f4..49f4e17 100644 --- a/crates/rocie-client/docs/ProductParentId.md +++ b/crates/rocie-client/docs/ProductParentId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**uuid::Uuid**](uuid::Uuid.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **value** | [**uuid::Uuid**](uuid::Uuid.md) | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductParentStub.md b/crates/rocie-client/docs/ProductParentStub.md index c15118e..a8a3544 100644 --- a/crates/rocie-client/docs/ProductParentStub.md +++ b/crates/rocie-client/docs/ProductParentStub.md @@ -2,12 +2,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | A description. | [optional] -**name** | **String** | The name of the product parent | -**parent** | Option<[**models::ProductParentId**](ProductParentId.md)> | A parent of this product parent, otherwise the parent will be the root of the parent tree. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| --------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------- | +| **description** | Option\<**String**> | A description. | [optional] | +| **name** | **String** | The name of the product parent | +| **parent** | Option\<[**models::ProductParentId**](ProductParentId.md)> | A parent of this product parent, otherwise the parent will be the root of the parent tree. | [optional] | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/ProductStub.md b/crates/rocie-client/docs/ProductStub.md index 10d783b..3c25dd4 100644 --- a/crates/rocie-client/docs/ProductStub.md +++ b/crates/rocie-client/docs/ProductStub.md @@ -2,13 +2,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | A description. | [optional] -**name** | **String** | The name of the product | -**parent** | Option<[**models::ProductParentId**](ProductParentId.md)> | A parent of this product, otherwise the parent will be the root of the parent tree. | [optional] -**unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | The Unit Property to use for this product. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ----------------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------- | +| **description** | Option\<**String**> | A description. | [optional] | +| **name** | **String** | The name of the product | +| **parent** | Option\<[**models::ProductParentId**](ProductParentId.md)> | A parent of this product, otherwise the parent will be the root of the parent tree. | [optional] | +| **unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | The Unit Property to use for this product. | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/Recipe.md b/crates/rocie-client/docs/Recipe.md index d179f97..d2aa0f9 100644 --- a/crates/rocie-client/docs/Recipe.md +++ b/crates/rocie-client/docs/Recipe.md @@ -2,12 +2,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | **String** | | -**id** | [**models::RecipeId**](RecipeId.md) | | -**path** | **String** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ----------- | ----------------------------------- | ----------- | ----- | +| **content** | **String** | | +| **id** | [**models::RecipeId**](RecipeId.md) | | +| **path** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/RecipeId.md b/crates/rocie-client/docs/RecipeId.md index 5211596..812de9a 100644 --- a/crates/rocie-client/docs/RecipeId.md +++ b/crates/rocie-client/docs/RecipeId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**uuid::Uuid**](uuid::Uuid.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **value** | [**uuid::Uuid**](uuid::Uuid.md) | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/RecipeStub.md b/crates/rocie-client/docs/RecipeStub.md index 4545fff..b123337 100644 --- a/crates/rocie-client/docs/RecipeStub.md +++ b/crates/rocie-client/docs/RecipeStub.md @@ -2,11 +2,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content** | **String** | The content of this recipe, in cooklang format | -**path** | **String** | The path the recipe should have | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ----------- | ---------- | ---------------------------------------------- | ----- | +| **content** | **String** | The content of this recipe, in cooklang format | +| **path** | **String** | The path the recipe should have | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/Unit.md b/crates/rocie-client/docs/Unit.md index 5349b7a..2db7b1a 100644 --- a/crates/rocie-client/docs/Unit.md +++ b/crates/rocie-client/docs/Unit.md @@ -2,15 +2,15 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | Description of this unit. | [optional] -**full_name_plural** | **String** | The plural version of this unit's name. Is used by a value of two and more. (We do not support Slovenian dual numerus versions) E.g.: Kilogram -> Kilograms gram -> meters | -**full_name_singular** | **String** | The singular version of this unit's name. E.g.: Kilogram Gram | -**id** | [**models::UnitId**](UnitId.md) | Unique id for this unit. | -**short_name** | **String** | Short name or abbreviation of this unit. E.g.: kg for Kilogram g for gram m for meter | -**unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | Which property is described by this unit. E.g.: kg -> Mass L -> Volume m/s -> Speed and so forth | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| ---------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | +| **description** | Option\<**String**> | Description of this unit. | [optional] | +| **full_name_plural** | **String** | The plural version of this unit's name. Is used by a value of two and more. (We do not support Slovenian dual numerus versions) E.g.: Kilogram -> Kilograms gram -> meters | +| **full_name_singular** | **String** | The singular version of this unit's name. E.g.: Kilogram Gram | +| **id** | [**models::UnitId**](UnitId.md) | Unique id for this unit. | +| **short_name** | **String** | Short name or abbreviation of this unit. E.g.: kg for Kilogram g for gram m for meter | +| **unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | Which property is described by this unit. E.g.: kg -> Mass L -> Volume m/s -> Speed and so forth | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UnitAmount.md b/crates/rocie-client/docs/UnitAmount.md index 1546f57..1bb855d 100644 --- a/crates/rocie-client/docs/UnitAmount.md +++ b/crates/rocie-client/docs/UnitAmount.md @@ -2,11 +2,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**unit** | [**models::UnitId**](UnitId.md) | | -**value** | **u32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **unit** | [**models::UnitId**](UnitId.md) | | +| **value** | **u32** | | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UnitId.md b/crates/rocie-client/docs/UnitId.md index 7d0979c..551eda2 100644 --- a/crates/rocie-client/docs/UnitId.md +++ b/crates/rocie-client/docs/UnitId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**uuid::Uuid**](uuid::Uuid.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **value** | [**uuid::Uuid**](uuid::Uuid.md) | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UnitProperty.md b/crates/rocie-client/docs/UnitProperty.md index b560f0c..fc6bfc9 100644 --- a/crates/rocie-client/docs/UnitProperty.md +++ b/crates/rocie-client/docs/UnitProperty.md @@ -2,13 +2,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | An description of this property. | [optional] -**id** | [**models::UnitPropertyId**](UnitPropertyId.md) | The unique ID for this unit property. | -**name** | **String** | The user-displayed name of this property. | -**units** | [**Vec<models::UnitId>**](UnitId.md) | The units with are measuring this property. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| --------------- | ----------------------------------------------- | ------------------------------------------- | ---------- | +| **description** | Option\<**String**> | An description of this property. | [optional] | +| **id** | [**models::UnitPropertyId**](UnitPropertyId.md) | The unique ID for this unit property. | +| **name** | **String** | The user-displayed name of this property. | +| **units** | [**Vec<models::UnitId>**](UnitId.md) | The units with are measuring this property. | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UnitPropertyId.md b/crates/rocie-client/docs/UnitPropertyId.md index 34d572f..7a228c1 100644 --- a/crates/rocie-client/docs/UnitPropertyId.md +++ b/crates/rocie-client/docs/UnitPropertyId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**uuid::Uuid**](uuid::Uuid.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **value** | [**uuid::Uuid**](uuid::Uuid.md) | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UnitPropertyStub.md b/crates/rocie-client/docs/UnitPropertyStub.md index 0fae3f7..e537d6f 100644 --- a/crates/rocie-client/docs/UnitPropertyStub.md +++ b/crates/rocie-client/docs/UnitPropertyStub.md @@ -2,11 +2,11 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | An optional description of the unit property. | [optional] -**name** | **String** | The name of the unit property. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| --------------- | ------------------- | --------------------------------------------- | ---------- | +| **description** | Option\<**String**> | An optional description of the unit property. | [optional] | +| **name** | **String** | The name of the unit property. | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UnitStub.md b/crates/rocie-client/docs/UnitStub.md index 92398c5..5b89817 100644 --- a/crates/rocie-client/docs/UnitStub.md +++ b/crates/rocie-client/docs/UnitStub.md @@ -2,14 +2,14 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**full_name_plural** | **String** | | -**full_name_singular** | **String** | | -**short_name** | **String** | | -**unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ---------------------- | ----------------------------------------------- | ----------- | ---------- | +| **description** | Option\<**String**> | | [optional] | +| **full_name_plural** | **String** | | +| **full_name_singular** | **String** | | +| **short_name** | **String** | | +| **unit_property** | [**models::UnitPropertyId**](UnitPropertyId.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/User.md b/crates/rocie-client/docs/User.md index d0f2a81..016740a 100644 --- a/crates/rocie-client/docs/User.md +++ b/crates/rocie-client/docs/User.md @@ -2,13 +2,13 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | An description of this user. | [optional] -**id** | [**models::UserId**](UserId.md) | The unique ID for this user. | -**name** | **String** | The user-displayed name of this user. | -**password_hash** | [**models::PasswordHash**](PasswordHash.md) | The hash of the user's password. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| ----------------- | ------------------------------------------- | ------------------------------------- | ---------- | +| **description** | Option\<**String**> | An description of this user. | [optional] | +| **id** | [**models::UserId**](UserId.md) | The unique ID for this user. | +| **name** | **String** | The user-displayed name of this user. | +| **password_hash** | [**models::PasswordHash**](PasswordHash.md) | The hash of the user's password. | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UserId.md b/crates/rocie-client/docs/UserId.md index f183106..b58b3dc 100644 --- a/crates/rocie-client/docs/UserId.md +++ b/crates/rocie-client/docs/UserId.md @@ -2,10 +2,10 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | [**uuid::Uuid**](uuid::Uuid.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - +| Name | Type | Description | Notes | +| --------- | ------------------------------- | ----------- | ----- | +| **value** | [**uuid::Uuid**](uuid::Uuid.md) | | +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/docs/UserStub.md b/crates/rocie-client/docs/UserStub.md index 60bd072..ef83846 100644 --- a/crates/rocie-client/docs/UserStub.md +++ b/crates/rocie-client/docs/UserStub.md @@ -2,12 +2,12 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | An optional description of the new user. | [optional] -**name** | **String** | The name of the new user. | -**password** | **String** | The password of the new user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - +| Name | Type | Description | Notes | +| --------------- | ------------------- | ---------------------------------------- | ---------- | +| **description** | Option\<**String**> | An optional description of the new user. | [optional] | +| **name** | **String** | The name of the new user. | +| **password** | **String** | The password of the new user. | + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) diff --git a/crates/rocie-client/src/apis/api_get_api.rs b/crates/rocie-client/src/apis/api_get_api.rs index a8f4c17..a13b3b1 100644 --- a/crates/rocie-client/src/apis/api_get_api.rs +++ b/crates/rocie-client/src/apis/api_get_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`product_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -32,12 +30,18 @@ pub enum ProductsError { UnknownValue(serde_json::Value), } - -pub async fn product_by_id(configuration: &configuration::Configuration, id: &str) -> Result<models::Product, Error<ProductByIdError>> { +pub async fn product_by_id( + configuration: &configuration::Configuration, + id: &str, +) -> Result<models::Product, Error<ProductByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/{id}", configuration.base_path, id=crate::apis::urlencode(p_id)); + let uri_str = format!( + "{}/product/{id}", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -59,18 +63,31 @@ pub async fn product_by_id(configuration: &configuration::Configuration, id: &st let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Product`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Product`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Product`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Product`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn products(configuration: &configuration::Configuration, ) -> Result<Vec<models::Product>, Error<ProductsError>> { - +pub async fn products( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Product>, Error<ProductsError>> { let uri_str = format!("{}/products/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -93,13 +110,24 @@ pub async fn products(configuration: &configuration::Configuration, ) -> Result< let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductsError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_inventory_api.rs b/crates/rocie-client/src/apis/api_get_auth_inventory_api.rs index 6249b62..a8b1684 100644 --- a/crates/rocie-client/src/apis/api_get_auth_inventory_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_inventory_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`amount_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -25,12 +23,18 @@ pub enum AmountByIdError { UnknownValue(serde_json::Value), } - -pub async fn amount_by_id(configuration: &configuration::Configuration, id: models::ProductId) -> Result<models::ProductAmount, Error<AmountByIdError>> { +pub async fn amount_by_id( + configuration: &configuration::Configuration, + id: models::ProductId, +) -> Result<models::ProductAmount, Error<AmountByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/inventory/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/inventory/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -52,13 +56,24 @@ pub async fn amount_by_id(configuration: &configuration::Configuration, id: mode let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProductAmount`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProductAmount`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::ProductAmount`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::ProductAmount`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<AmountByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_product_api.rs b/crates/rocie-client/src/apis/api_get_auth_product_api.rs index dcc35a7..e6a3db2 100644 --- a/crates/rocie-client/src/apis/api_get_auth_product_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_product_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`product_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -82,12 +80,18 @@ pub enum ProductsRegisteredError { UnknownValue(serde_json::Value), } - -pub async fn product_by_id(configuration: &configuration::Configuration, id: models::ProductId) -> Result<models::Product, Error<ProductByIdError>> { +pub async fn product_by_id( + configuration: &configuration::Configuration, + id: models::ProductId, +) -> Result<models::Product, Error<ProductByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/by-id/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product/by-id/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -109,21 +113,40 @@ pub async fn product_by_id(configuration: &configuration::Configuration, id: mod let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Product`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Product`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Product`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Product`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_by_name(configuration: &configuration::Configuration, name: &str) -> Result<models::Product, Error<ProductByNameError>> { +pub async fn product_by_name( + configuration: &configuration::Configuration, + name: &str, +) -> Result<models::Product, Error<ProductByNameError>> { // add a prefix to parameters to efficiently prevent name collisions let p_name = name; - let uri_str = format!("{}/product/by-name/{name}", configuration.base_path, name=crate::apis::urlencode(p_name)); + let uri_str = format!( + "{}/product/by-name/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -145,21 +168,40 @@ pub async fn product_by_name(configuration: &configuration::Configuration, name: let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Product`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Product`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Product`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Product`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductByNameError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_suggestion_by_name(configuration: &configuration::Configuration, name: &str) -> Result<Vec<models::Product>, Error<ProductSuggestionByNameError>> { +pub async fn product_suggestion_by_name( + configuration: &configuration::Configuration, + name: &str, +) -> Result<Vec<models::Product>, Error<ProductSuggestionByNameError>> { // add a prefix to parameters to efficiently prevent name collisions let p_name = name; - let uri_str = format!("{}/product/by-part-name/{name}", configuration.base_path, name=crate::apis::urlencode(p_name)); + let uri_str = format!( + "{}/product/by-part-name/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -181,22 +223,41 @@ pub async fn product_suggestion_by_name(configuration: &configuration::Configura let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductSuggestionByNameError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// This will only return products directly associated with this product parent id -pub async fn products_by_product_parent_id_direct(configuration: &configuration::Configuration, id: models::ProductParentId) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdDirectError>> { +pub async fn products_by_product_parent_id_direct( + configuration: &configuration::Configuration, + id: models::ProductParentId, +) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdDirectError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/by-product-parent-id-direct/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product/by-product-parent-id-direct/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -218,22 +279,42 @@ pub async fn products_by_product_parent_id_direct(configuration: &configuration: let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; - let entity: Option<ProductsByProductParentIdDirectError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option<ProductsByProductParentIdDirectError> = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// This will also return all products below this product parent id -pub async fn products_by_product_parent_id_indirect(configuration: &configuration::Configuration, id: models::ProductParentId) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdIndirectError>> { +pub async fn products_by_product_parent_id_indirect( + configuration: &configuration::Configuration, + id: models::ProductParentId, +) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdIndirectError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/by-product-parent-id-indirect/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product/by-product-parent-id-indirect/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -255,18 +336,32 @@ pub async fn products_by_product_parent_id_indirect(configuration: &configuratio let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; - let entity: Option<ProductsByProductParentIdIndirectError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option<ProductsByProductParentIdIndirectError> = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn products_in_storage(configuration: &configuration::Configuration, ) -> Result<Vec<models::Product>, Error<ProductsInStorageError>> { - +pub async fn products_in_storage( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Product>, Error<ProductsInStorageError>> { let uri_str = format!("{}/products_in_storage/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -289,18 +384,31 @@ pub async fn products_in_storage(configuration: &configuration::Configuration, ) let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductsInStorageError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn products_registered(configuration: &configuration::Configuration, ) -> Result<Vec<models::Product>, Error<ProductsRegisteredError>> { - +pub async fn products_registered( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Product>, Error<ProductsRegisteredError>> { let uri_str = format!("{}/products_registered/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -323,13 +431,24 @@ pub async fn products_registered(configuration: &configuration::Configuration, ) let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductsRegisteredError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_product_parent_api.rs b/crates/rocie-client/src/apis/api_get_auth_product_parent_api.rs index 68b17d7..b29a155 100644 --- a/crates/rocie-client/src/apis/api_get_auth_product_parent_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_product_parent_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`product_parents`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -42,9 +40,9 @@ pub enum ProductParentsUnderError { UnknownValue(serde_json::Value), } - -pub async fn product_parents(configuration: &configuration::Configuration, ) -> Result<Vec<models::ProductParent>, Error<ProductParentsError>> { - +pub async fn product_parents( + configuration: &configuration::Configuration, +) -> Result<Vec<models::ProductParent>, Error<ProductParentsError>> { let uri_str = format!("{}/product_parents/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -67,18 +65,31 @@ pub async fn product_parents(configuration: &configuration::Configuration, ) -> let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductParentsError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_parents_toplevel(configuration: &configuration::Configuration, ) -> Result<Vec<models::ProductParent>, Error<ProductParentsToplevelError>> { - +pub async fn product_parents_toplevel( + configuration: &configuration::Configuration, +) -> Result<Vec<models::ProductParent>, Error<ProductParentsToplevelError>> { let uri_str = format!("{}/product_parents_toplevel/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -101,21 +112,40 @@ pub async fn product_parents_toplevel(configuration: &configuration::Configurati let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductParentsToplevelError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_parents_under(configuration: &configuration::Configuration, id: models::ProductParentId) -> Result<Vec<models::ProductParent>, Error<ProductParentsUnderError>> { +pub async fn product_parents_under( + configuration: &configuration::Configuration, + id: models::ProductParentId, +) -> Result<Vec<models::ProductParent>, Error<ProductParentsUnderError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product_parents_under/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product_parents_under/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -137,13 +167,24 @@ pub async fn product_parents_under(configuration: &configuration::Configuration, let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductParentsUnderError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_recipe_api.rs b/crates/rocie-client/src/apis/api_get_auth_recipe_api.rs index 4eddb2f..90420c9 100644 --- a/crates/rocie-client/src/apis/api_get_auth_recipe_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_recipe_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`recipe_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -34,12 +32,18 @@ pub enum RecipesError { UnknownValue(serde_json::Value), } - -pub async fn recipe_by_id(configuration: &configuration::Configuration, id: models::RecipeId) -> Result<models::Recipe, Error<RecipeByIdError>> { +pub async fn recipe_by_id( + configuration: &configuration::Configuration, + id: models::RecipeId, +) -> Result<models::Recipe, Error<RecipeByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/recipe/by-id/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/recipe/by-id/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -61,18 +65,31 @@ pub async fn recipe_by_id(configuration: &configuration::Configuration, id: mode let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Recipe`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Recipe`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RecipeByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn recipes(configuration: &configuration::Configuration, ) -> Result<models::Recipe, Error<RecipesError>> { - +pub async fn recipes( + configuration: &configuration::Configuration, +) -> Result<models::Recipe, Error<RecipesError>> { let uri_str = format!("{}/recipe/all", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -95,13 +112,24 @@ pub async fn recipes(configuration: &configuration::Configuration, ) -> Result<m let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Recipe`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Recipe`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RecipesError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_unit_api.rs b/crates/rocie-client/src/apis/api_get_auth_unit_api.rs index c1f7e97..5d17a74 100644 --- a/crates/rocie-client/src/apis/api_get_auth_unit_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_unit_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`unit_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -43,12 +41,18 @@ pub enum UnitsByPropertyIdError { UnknownValue(serde_json::Value), } - -pub async fn unit_by_id(configuration: &configuration::Configuration, id: models::UnitId) -> Result<models::Unit, Error<UnitByIdError>> { +pub async fn unit_by_id( + configuration: &configuration::Configuration, + id: models::UnitId, +) -> Result<models::Unit, Error<UnitByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/unit/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/unit/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -70,18 +74,31 @@ pub async fn unit_by_id(configuration: &configuration::Configuration, id: models let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Unit`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Unit`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Unit`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Unit`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn units(configuration: &configuration::Configuration, ) -> Result<Vec<models::Unit>, Error<UnitsError>> { - +pub async fn units( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Unit>, Error<UnitsError>> { let uri_str = format!("{}/units/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -104,21 +121,40 @@ pub async fn units(configuration: &configuration::Configuration, ) -> Result<Vec let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitsError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn units_by_property_id(configuration: &configuration::Configuration, id: models::UnitPropertyId) -> Result<Vec<models::Unit>, Error<UnitsByPropertyIdError>> { +pub async fn units_by_property_id( + configuration: &configuration::Configuration, + id: models::UnitPropertyId, +) -> Result<Vec<models::Unit>, Error<UnitsByPropertyIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/units-by-property/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/units-by-property/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -140,13 +176,24 @@ pub async fn units_by_property_id(configuration: &configuration::Configuration, let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitsByPropertyIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_unit_property_api.rs b/crates/rocie-client/src/apis/api_get_auth_unit_property_api.rs index 1359f40..a2ac138 100644 --- a/crates/rocie-client/src/apis/api_get_auth_unit_property_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_unit_property_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`unit_properties`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -34,9 +32,9 @@ pub enum UnitPropertyByIdError { UnknownValue(serde_json::Value), } - -pub async fn unit_properties(configuration: &configuration::Configuration, ) -> Result<Vec<models::UnitProperty>, Error<UnitPropertiesError>> { - +pub async fn unit_properties( + configuration: &configuration::Configuration, +) -> Result<Vec<models::UnitProperty>, Error<UnitPropertiesError>> { let uri_str = format!("{}/unit-properties/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -59,21 +57,40 @@ pub async fn unit_properties(configuration: &configuration::Configuration, ) -> let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::UnitProperty>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::UnitProperty>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::UnitProperty>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::UnitProperty>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitPropertiesError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn unit_property_by_id(configuration: &configuration::Configuration, id: models::UnitPropertyId) -> Result<models::UnitProperty, Error<UnitPropertyByIdError>> { +pub async fn unit_property_by_id( + configuration: &configuration::Configuration, + id: models::UnitPropertyId, +) -> Result<models::UnitProperty, Error<UnitPropertyByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/unit-property/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/unit-property/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -95,13 +112,24 @@ pub async fn unit_property_by_id(configuration: &configuration::Configuration, i let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitProperty`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitProperty`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UnitProperty`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UnitProperty`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitPropertyByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_auth_user_api.rs b/crates/rocie-client/src/apis/api_get_auth_user_api.rs index 61e3935..64d4671 100644 --- a/crates/rocie-client/src/apis/api_get_auth_user_api.rs +++ b/crates/rocie-client/src/apis/api_get_auth_user_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`user_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -35,12 +33,18 @@ pub enum UsersError { UnknownValue(serde_json::Value), } - -pub async fn user_by_id(configuration: &configuration::Configuration, id: models::UserId) -> Result<models::User, Error<UserByIdError>> { +pub async fn user_by_id( + configuration: &configuration::Configuration, + id: models::UserId, +) -> Result<models::User, Error<UserByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/user/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/user/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -62,18 +66,31 @@ pub async fn user_by_id(configuration: &configuration::Configuration, id: models let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::User`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::User`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UserByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn users(configuration: &configuration::Configuration, ) -> Result<Vec<models::User>, Error<UsersError>> { - +pub async fn users( + configuration: &configuration::Configuration, +) -> Result<Vec<models::User>, Error<UsersError>> { let uri_str = format!("{}/users", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -96,13 +113,24 @@ pub async fn users(configuration: &configuration::Configuration, ) -> Result<Vec let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::User>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UsersError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_inventory_api.rs b/crates/rocie-client/src/apis/api_get_inventory_api.rs index e11fc7f..cdc8d95 100644 --- a/crates/rocie-client/src/apis/api_get_inventory_api.rs +++ b/crates/rocie-client/src/apis/api_get_inventory_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`amount_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -24,12 +22,18 @@ pub enum AmountByIdError { UnknownValue(serde_json::Value), } - -pub async fn amount_by_id(configuration: &configuration::Configuration, id: models::ProductId) -> Result<models::ProductAmount, Error<AmountByIdError>> { +pub async fn amount_by_id( + configuration: &configuration::Configuration, + id: models::ProductId, +) -> Result<models::ProductAmount, Error<AmountByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/inventory/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/inventory/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -51,13 +55,24 @@ pub async fn amount_by_id(configuration: &configuration::Configuration, id: mode let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProductAmount`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProductAmount`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::ProductAmount`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::ProductAmount`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<AmountByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_no_auth_user_api.rs b/crates/rocie-client/src/apis/api_get_no_auth_user_api.rs index 1a5e91d..68b92c8 100644 --- a/crates/rocie-client/src/apis/api_get_no_auth_user_api.rs +++ b/crates/rocie-client/src/apis/api_get_no_auth_user_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`user_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -33,12 +31,18 @@ pub enum UsersError { UnknownValue(serde_json::Value), } - -pub async fn user_by_id(configuration: &configuration::Configuration, id: models::UserId) -> Result<models::User, Error<UserByIdError>> { +pub async fn user_by_id( + configuration: &configuration::Configuration, + id: models::UserId, +) -> Result<models::User, Error<UserByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/user/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/user/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -60,18 +64,31 @@ pub async fn user_by_id(configuration: &configuration::Configuration, id: models let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::User`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::User`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::User`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::User`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UserByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn users(configuration: &configuration::Configuration, ) -> Result<Vec<models::User>, Error<UsersError>> { - +pub async fn users( + configuration: &configuration::Configuration, +) -> Result<Vec<models::User>, Error<UsersError>> { let uri_str = format!("{}/users", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -94,13 +111,24 @@ pub async fn users(configuration: &configuration::Configuration, ) -> Result<Vec let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::User>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::User>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::User>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UsersError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_product_api.rs b/crates/rocie-client/src/apis/api_get_product_api.rs index a4bf9b8..6cc555f 100644 --- a/crates/rocie-client/src/apis/api_get_product_api.rs +++ b/crates/rocie-client/src/apis/api_get_product_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`product_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -75,12 +73,18 @@ pub enum ProductsRegisteredError { UnknownValue(serde_json::Value), } - -pub async fn product_by_id(configuration: &configuration::Configuration, id: models::ProductId) -> Result<models::Product, Error<ProductByIdError>> { +pub async fn product_by_id( + configuration: &configuration::Configuration, + id: models::ProductId, +) -> Result<models::Product, Error<ProductByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/by-id/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product/by-id/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -102,21 +106,40 @@ pub async fn product_by_id(configuration: &configuration::Configuration, id: mod let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Product`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Product`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Product`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Product`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_by_name(configuration: &configuration::Configuration, name: &str) -> Result<models::Product, Error<ProductByNameError>> { +pub async fn product_by_name( + configuration: &configuration::Configuration, + name: &str, +) -> Result<models::Product, Error<ProductByNameError>> { // add a prefix to parameters to efficiently prevent name collisions let p_name = name; - let uri_str = format!("{}/product/by-name/{name}", configuration.base_path, name=crate::apis::urlencode(p_name)); + let uri_str = format!( + "{}/product/by-name/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -138,21 +161,40 @@ pub async fn product_by_name(configuration: &configuration::Configuration, name: let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Product`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Product`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Product`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Product`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductByNameError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_suggestion_by_name(configuration: &configuration::Configuration, name: &str) -> Result<Vec<models::Product>, Error<ProductSuggestionByNameError>> { +pub async fn product_suggestion_by_name( + configuration: &configuration::Configuration, + name: &str, +) -> Result<Vec<models::Product>, Error<ProductSuggestionByNameError>> { // add a prefix to parameters to efficiently prevent name collisions let p_name = name; - let uri_str = format!("{}/product/by-part-name/{name}", configuration.base_path, name=crate::apis::urlencode(p_name)); + let uri_str = format!( + "{}/product/by-part-name/{name}", + configuration.base_path, + name = crate::apis::urlencode(p_name) + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -174,22 +216,41 @@ pub async fn product_suggestion_by_name(configuration: &configuration::Configura let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductSuggestionByNameError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// This will only return products directly associated with this product parent id -pub async fn products_by_product_parent_id_direct(configuration: &configuration::Configuration, id: models::ProductParentId) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdDirectError>> { +pub async fn products_by_product_parent_id_direct( + configuration: &configuration::Configuration, + id: models::ProductParentId, +) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdDirectError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/by-product-parent-id-direct/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product/by-product-parent-id-direct/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -211,22 +272,42 @@ pub async fn products_by_product_parent_id_direct(configuration: &configuration: let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; - let entity: Option<ProductsByProductParentIdDirectError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option<ProductsByProductParentIdDirectError> = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// This will also return all products below this product parent id -pub async fn products_by_product_parent_id_indirect(configuration: &configuration::Configuration, id: models::ProductParentId) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdIndirectError>> { +pub async fn products_by_product_parent_id_indirect( + configuration: &configuration::Configuration, + id: models::ProductParentId, +) -> Result<Vec<models::Product>, Error<ProductsByProductParentIdIndirectError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product/by-product-parent-id-indirect/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product/by-product-parent-id-indirect/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -248,18 +329,32 @@ pub async fn products_by_product_parent_id_indirect(configuration: &configuratio let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; - let entity: Option<ProductsByProductParentIdIndirectError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + let entity: Option<ProductsByProductParentIdIndirectError> = + serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn products_in_storage(configuration: &configuration::Configuration, ) -> Result<Vec<models::Product>, Error<ProductsInStorageError>> { - +pub async fn products_in_storage( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Product>, Error<ProductsInStorageError>> { let uri_str = format!("{}/products_in_storage/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -282,18 +377,31 @@ pub async fn products_in_storage(configuration: &configuration::Configuration, ) let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductsInStorageError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn products_registered(configuration: &configuration::Configuration, ) -> Result<Vec<models::Product>, Error<ProductsRegisteredError>> { - +pub async fn products_registered( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Product>, Error<ProductsRegisteredError>> { let uri_str = format!("{}/products_registered/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -316,13 +424,24 @@ pub async fn products_registered(configuration: &configuration::Configuration, ) let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Product>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Product>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductsRegisteredError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_product_parent_api.rs b/crates/rocie-client/src/apis/api_get_product_parent_api.rs index 6adc6e1..09db44c 100644 --- a/crates/rocie-client/src/apis/api_get_product_parent_api.rs +++ b/crates/rocie-client/src/apis/api_get_product_parent_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`product_parents`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -39,9 +37,9 @@ pub enum ProductParentsUnderError { UnknownValue(serde_json::Value), } - -pub async fn product_parents(configuration: &configuration::Configuration, ) -> Result<Vec<models::ProductParent>, Error<ProductParentsError>> { - +pub async fn product_parents( + configuration: &configuration::Configuration, +) -> Result<Vec<models::ProductParent>, Error<ProductParentsError>> { let uri_str = format!("{}/product_parents/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -64,18 +62,31 @@ pub async fn product_parents(configuration: &configuration::Configuration, ) -> let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductParentsError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_parents_toplevel(configuration: &configuration::Configuration, ) -> Result<Vec<models::ProductParent>, Error<ProductParentsToplevelError>> { - +pub async fn product_parents_toplevel( + configuration: &configuration::Configuration, +) -> Result<Vec<models::ProductParent>, Error<ProductParentsToplevelError>> { let uri_str = format!("{}/product_parents_toplevel/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -98,21 +109,40 @@ pub async fn product_parents_toplevel(configuration: &configuration::Configurati let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductParentsToplevelError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn product_parents_under(configuration: &configuration::Configuration, id: models::ProductParentId) -> Result<Vec<models::ProductParent>, Error<ProductParentsUnderError>> { +pub async fn product_parents_under( + configuration: &configuration::Configuration, + id: models::ProductParentId, +) -> Result<Vec<models::ProductParent>, Error<ProductParentsUnderError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/product_parents_under/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/product_parents_under/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -134,13 +164,24 @@ pub async fn product_parents_under(configuration: &configuration::Configuration, let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::ProductParent>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::ProductParent>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProductParentsUnderError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_recipe_api.rs b/crates/rocie-client/src/apis/api_get_recipe_api.rs index f29a2ce..321e3a1 100644 --- a/crates/rocie-client/src/apis/api_get_recipe_api.rs +++ b/crates/rocie-client/src/apis/api_get_recipe_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`recipe_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -32,12 +30,18 @@ pub enum RecipesError { UnknownValue(serde_json::Value), } - -pub async fn recipe_by_id(configuration: &configuration::Configuration, id: models::RecipeId) -> Result<models::Recipe, Error<RecipeByIdError>> { +pub async fn recipe_by_id( + configuration: &configuration::Configuration, + id: models::RecipeId, +) -> Result<models::Recipe, Error<RecipeByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/recipe/by-id/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/recipe/by-id/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -59,18 +63,31 @@ pub async fn recipe_by_id(configuration: &configuration::Configuration, id: mode let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Recipe`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Recipe`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RecipeByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn recipes(configuration: &configuration::Configuration, ) -> Result<models::Recipe, Error<RecipesError>> { - +pub async fn recipes( + configuration: &configuration::Configuration, +) -> Result<models::Recipe, Error<RecipesError>> { let uri_str = format!("{}/recipe/all", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -93,13 +110,24 @@ pub async fn recipes(configuration: &configuration::Configuration, ) -> Result<m let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Recipe`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Recipe`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Recipe`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RecipesError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_unit_api.rs b/crates/rocie-client/src/apis/api_get_unit_api.rs index df25b47..3e27264 100644 --- a/crates/rocie-client/src/apis/api_get_unit_api.rs +++ b/crates/rocie-client/src/apis/api_get_unit_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`unit_by_id`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -40,12 +38,18 @@ pub enum UnitsByPropertyIdError { UnknownValue(serde_json::Value), } - -pub async fn unit_by_id(configuration: &configuration::Configuration, id: models::UnitId) -> Result<models::Unit, Error<UnitByIdError>> { +pub async fn unit_by_id( + configuration: &configuration::Configuration, + id: models::UnitId, +) -> Result<models::Unit, Error<UnitByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/unit/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/unit/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -67,18 +71,31 @@ pub async fn unit_by_id(configuration: &configuration::Configuration, id: models let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Unit`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Unit`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::Unit`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::Unit`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn units(configuration: &configuration::Configuration, ) -> Result<Vec<models::Unit>, Error<UnitsError>> { - +pub async fn units( + configuration: &configuration::Configuration, +) -> Result<Vec<models::Unit>, Error<UnitsError>> { let uri_str = format!("{}/units/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -101,21 +118,40 @@ pub async fn units(configuration: &configuration::Configuration, ) -> Result<Vec let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitsError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn units_by_property_id(configuration: &configuration::Configuration, id: models::UnitPropertyId) -> Result<Vec<models::Unit>, Error<UnitsByPropertyIdError>> { +pub async fn units_by_property_id( + configuration: &configuration::Configuration, + id: models::UnitPropertyId, +) -> Result<Vec<models::Unit>, Error<UnitsByPropertyIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/units-by-property/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/units-by-property/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -137,13 +173,24 @@ pub async fn units_by_property_id(configuration: &configuration::Configuration, let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::Unit>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Unit>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitsByPropertyIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_get_unit_property_api.rs b/crates/rocie-client/src/apis/api_get_unit_property_api.rs index 1082dcb..f61258b 100644 --- a/crates/rocie-client/src/apis/api_get_unit_property_api.rs +++ b/crates/rocie-client/src/apis/api_get_unit_property_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`unit_properties`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -32,9 +30,9 @@ pub enum UnitPropertyByIdError { UnknownValue(serde_json::Value), } - -pub async fn unit_properties(configuration: &configuration::Configuration, ) -> Result<Vec<models::UnitProperty>, Error<UnitPropertiesError>> { - +pub async fn unit_properties( + configuration: &configuration::Configuration, +) -> Result<Vec<models::UnitProperty>, Error<UnitPropertiesError>> { let uri_str = format!("{}/unit-properties/", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); @@ -57,21 +55,40 @@ pub async fn unit_properties(configuration: &configuration::Configuration, ) -> let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::UnitProperty>`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::UnitProperty>`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `Vec<models::UnitProperty>`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `Vec<models::UnitProperty>`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitPropertiesError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn unit_property_by_id(configuration: &configuration::Configuration, id: models::UnitPropertyId) -> Result<models::UnitProperty, Error<UnitPropertyByIdError>> { +pub async fn unit_property_by_id( + configuration: &configuration::Configuration, + id: models::UnitPropertyId, +) -> Result<models::UnitProperty, Error<UnitPropertyByIdError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; - let uri_str = format!("{}/unit-property/{id}", configuration.base_path, id=p_id.to_string()); + let uri_str = format!( + "{}/unit-property/{id}", + configuration.base_path, + id = p_id.to_string() + ); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { @@ -93,13 +110,24 @@ pub async fn unit_property_by_id(configuration: &configuration::Configuration, i let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitProperty`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitProperty`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UnitProperty`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UnitProperty`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<UnitPropertyByIdError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_api.rs b/crates/rocie-client/src/apis/api_set_api.rs index 81f029e..5a029b8 100644 --- a/crates/rocie-client/src/apis/api_set_api.rs +++ b/crates/rocie-client/src/apis/api_set_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`associate_barcode`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -33,14 +31,23 @@ pub enum RegisterProductError { UnknownValue(serde_json::Value), } - -pub async fn associate_barcode(configuration: &configuration::Configuration, id: &str, barcode: models::Barcode) -> Result<(), Error<AssociateBarcodeError>> { +pub async fn associate_barcode( + configuration: &configuration::Configuration, + id: &str, + barcode: models::Barcode, +) -> Result<(), Error<AssociateBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_barcode = barcode; - let uri_str = format!("{}/product/{id}/associate", configuration.base_path, id=crate::apis::urlencode(p_id)); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/product/{id}/associate", + configuration.base_path, + id = crate::apis::urlencode(p_id) + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -57,16 +64,25 @@ pub async fn associate_barcode(configuration: &configuration::Configuration, id: } else { let content = resp.text().await?; let entity: Option<AssociateBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn register_product(configuration: &configuration::Configuration, product_stub: models::ProductStub) -> Result<uuid::Uuid, Error<RegisterProductError>> { +pub async fn register_product( + configuration: &configuration::Configuration, + product_stub: models::ProductStub, +) -> Result<uuid::Uuid, Error<RegisterProductError>> { // add a prefix to parameters to efficiently prevent name collisions let p_product_stub = product_stub; let uri_str = format!("{}/product/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -88,13 +104,24 @@ pub async fn register_product(configuration: &configuration::Configuration, prod let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `uuid::Uuid`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `uuid::Uuid`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `uuid::Uuid`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `uuid::Uuid`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterProductError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_barcode_api.rs b/crates/rocie-client/src/apis/api_set_auth_barcode_api.rs index 494694d..55f813e 100644 --- a/crates/rocie-client/src/apis/api_set_auth_barcode_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_barcode_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`buy_barcode`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -35,14 +33,24 @@ pub enum ConsumeBarcodeError { UnknownValue(serde_json::Value), } - -pub async fn buy_barcode(configuration: &configuration::Configuration, barcode_id: models::BarcodeId, times: u32) -> Result<(), Error<BuyBarcodeError>> { +pub async fn buy_barcode( + configuration: &configuration::Configuration, + barcode_id: models::BarcodeId, + times: u32, +) -> Result<(), Error<BuyBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_barcode_id = barcode_id; let p_times = times; - let uri_str = format!("{}/barcode/{barcode_id}/buy/{times}", configuration.base_path, barcode_id=p_barcode_id.to_string(), times=p_times); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/barcode/{barcode_id}/buy/{times}", + configuration.base_path, + barcode_id = p_barcode_id.to_string(), + times = p_times + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -58,17 +66,31 @@ pub async fn buy_barcode(configuration: &configuration::Configuration, barcode_i } else { let content = resp.text().await?; let entity: Option<BuyBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn consume_barcode(configuration: &configuration::Configuration, id: models::BarcodeId, unit_amount: models::UnitAmount) -> Result<(), Error<ConsumeBarcodeError>> { +pub async fn consume_barcode( + configuration: &configuration::Configuration, + id: models::BarcodeId, + unit_amount: models::UnitAmount, +) -> Result<(), Error<ConsumeBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_unit_amount = unit_amount; - let uri_str = format!("{}/barcode/{id}/consume", configuration.base_path, id=p_id.to_string()); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/barcode/{id}/consume", + configuration.base_path, + id = p_id.to_string() + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -85,7 +107,10 @@ pub async fn consume_barcode(configuration: &configuration::Configuration, id: m } else { let content = resp.text().await?; let entity: Option<ConsumeBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_product_api.rs b/crates/rocie-client/src/apis/api_set_auth_product_api.rs index fd1cd23..e29c7f1 100644 --- a/crates/rocie-client/src/apis/api_set_auth_product_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_product_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`associate_barcode`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -35,14 +33,23 @@ pub enum RegisterProductError { UnknownValue(serde_json::Value), } - -pub async fn associate_barcode(configuration: &configuration::Configuration, id: models::ProductId, barcode: models::Barcode) -> Result<(), Error<AssociateBarcodeError>> { +pub async fn associate_barcode( + configuration: &configuration::Configuration, + id: models::ProductId, + barcode: models::Barcode, +) -> Result<(), Error<AssociateBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_barcode = barcode; - let uri_str = format!("{}/product/{id}/associate", configuration.base_path, id=p_id.to_string()); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/product/{id}/associate", + configuration.base_path, + id = p_id.to_string() + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -59,16 +66,25 @@ pub async fn associate_barcode(configuration: &configuration::Configuration, id: } else { let content = resp.text().await?; let entity: Option<AssociateBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn register_product(configuration: &configuration::Configuration, product_stub: models::ProductStub) -> Result<models::ProductId, Error<RegisterProductError>> { +pub async fn register_product( + configuration: &configuration::Configuration, + product_stub: models::ProductStub, +) -> Result<models::ProductId, Error<RegisterProductError>> { // add a prefix to parameters to efficiently prevent name collisions let p_product_stub = product_stub; let uri_str = format!("{}/product/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -90,13 +106,24 @@ pub async fn register_product(configuration: &configuration::Configuration, prod let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProductId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProductId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::ProductId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::ProductId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterProductError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_product_parent_api.rs b/crates/rocie-client/src/apis/api_set_auth_product_parent_api.rs index 6ec3a17..f42dd99 100644 --- a/crates/rocie-client/src/apis/api_set_auth_product_parent_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_product_parent_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_product_parent`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -24,13 +22,17 @@ pub enum RegisterProductParentError { UnknownValue(serde_json::Value), } - -pub async fn register_product_parent(configuration: &configuration::Configuration, product_parent_stub: models::ProductParentStub) -> Result<models::ProductParentId, Error<RegisterProductParentError>> { +pub async fn register_product_parent( + configuration: &configuration::Configuration, + product_parent_stub: models::ProductParentStub, +) -> Result<models::ProductParentId, Error<RegisterProductParentError>> { // add a prefix to parameters to efficiently prevent name collisions let p_product_parent_stub = product_parent_stub; let uri_str = format!("{}/product_parent/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -52,13 +54,24 @@ pub async fn register_product_parent(configuration: &configuration::Configuratio let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProductParentId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProductParentId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::ProductParentId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::ProductParentId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterProductParentError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_recipe_api.rs b/crates/rocie-client/src/apis/api_set_auth_recipe_api.rs index 52eb874..8df320d 100644 --- a/crates/rocie-client/src/apis/api_set_auth_recipe_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_recipe_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`add_recipe`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -24,13 +22,17 @@ pub enum AddRecipeError { UnknownValue(serde_json::Value), } - -pub async fn add_recipe(configuration: &configuration::Configuration, recipe_stub: models::RecipeStub) -> Result<models::RecipeId, Error<AddRecipeError>> { +pub async fn add_recipe( + configuration: &configuration::Configuration, + recipe_stub: models::RecipeStub, +) -> Result<models::RecipeId, Error<AddRecipeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_recipe_stub = recipe_stub; let uri_str = format!("{}/recipe/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -52,13 +54,24 @@ pub async fn add_recipe(configuration: &configuration::Configuration, recipe_stu let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RecipeId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RecipeId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::RecipeId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::RecipeId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<AddRecipeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_unit_api.rs b/crates/rocie-client/src/apis/api_set_auth_unit_api.rs index 0f96f98..d9bf507 100644 --- a/crates/rocie-client/src/apis/api_set_auth_unit_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_unit_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_unit`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -24,13 +22,17 @@ pub enum RegisterUnitError { UnknownValue(serde_json::Value), } - -pub async fn register_unit(configuration: &configuration::Configuration, unit_stub: models::UnitStub) -> Result<models::UnitId, Error<RegisterUnitError>> { +pub async fn register_unit( + configuration: &configuration::Configuration, + unit_stub: models::UnitStub, +) -> Result<models::UnitId, Error<RegisterUnitError>> { // add a prefix to parameters to efficiently prevent name collisions let p_unit_stub = unit_stub; let uri_str = format!("{}/unit/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -52,13 +54,24 @@ pub async fn register_unit(configuration: &configuration::Configuration, unit_st let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UnitId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UnitId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterUnitError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_unit_property_api.rs b/crates/rocie-client/src/apis/api_set_auth_unit_property_api.rs index bfb8a4d..cb59235 100644 --- a/crates/rocie-client/src/apis/api_set_auth_unit_property_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_unit_property_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_unit_property`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -24,13 +22,17 @@ pub enum RegisterUnitPropertyError { UnknownValue(serde_json::Value), } - -pub async fn register_unit_property(configuration: &configuration::Configuration, unit_property_stub: models::UnitPropertyStub) -> Result<models::UnitPropertyId, Error<RegisterUnitPropertyError>> { +pub async fn register_unit_property( + configuration: &configuration::Configuration, + unit_property_stub: models::UnitPropertyStub, +) -> Result<models::UnitPropertyId, Error<RegisterUnitPropertyError>> { // add a prefix to parameters to efficiently prevent name collisions let p_unit_property_stub = unit_property_stub; let uri_str = format!("{}/unit-property/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -52,13 +54,24 @@ pub async fn register_unit_property(configuration: &configuration::Configuration let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitPropertyId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitPropertyId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UnitPropertyId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UnitPropertyId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterUnitPropertyError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_auth_user_api.rs b/crates/rocie-client/src/apis/api_set_auth_user_api.rs index 4f43bbe..758b707 100644 --- a/crates/rocie-client/src/apis/api_set_auth_user_api.rs +++ b/crates/rocie-client/src/apis/api_set_auth_user_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_user`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -24,13 +22,17 @@ pub enum RegisterUserError { UnknownValue(serde_json::Value), } - -pub async fn register_user(configuration: &configuration::Configuration, user_stub: models::UserStub) -> Result<models::UserId, Error<RegisterUserError>> { +pub async fn register_user( + configuration: &configuration::Configuration, + user_stub: models::UserStub, +) -> Result<models::UserId, Error<RegisterUserError>> { // add a prefix to parameters to efficiently prevent name collisions let p_user_stub = user_stub; let uri_str = format!("{}/user/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -52,13 +54,24 @@ pub async fn register_user(configuration: &configuration::Configuration, user_st let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UserId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UserId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterUserError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_barcode_api.rs b/crates/rocie-client/src/apis/api_set_barcode_api.rs index fd47d04..d6e0b0a 100644 --- a/crates/rocie-client/src/apis/api_set_barcode_api.rs +++ b/crates/rocie-client/src/apis/api_set_barcode_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`buy_barcode`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -33,14 +31,24 @@ pub enum ConsumeBarcodeError { UnknownValue(serde_json::Value), } - -pub async fn buy_barcode(configuration: &configuration::Configuration, barcode_id: models::BarcodeId, times: u32) -> Result<(), Error<BuyBarcodeError>> { +pub async fn buy_barcode( + configuration: &configuration::Configuration, + barcode_id: models::BarcodeId, + times: u32, +) -> Result<(), Error<BuyBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_barcode_id = barcode_id; let p_times = times; - let uri_str = format!("{}/barcode/{barcode_id}/buy/{times}", configuration.base_path, barcode_id=p_barcode_id.to_string(), times=p_times); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/barcode/{barcode_id}/buy/{times}", + configuration.base_path, + barcode_id = p_barcode_id.to_string(), + times = p_times + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -56,17 +64,31 @@ pub async fn buy_barcode(configuration: &configuration::Configuration, barcode_i } else { let content = resp.text().await?; let entity: Option<BuyBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn consume_barcode(configuration: &configuration::Configuration, id: models::BarcodeId, unit_amount: models::UnitAmount) -> Result<(), Error<ConsumeBarcodeError>> { +pub async fn consume_barcode( + configuration: &configuration::Configuration, + id: models::BarcodeId, + unit_amount: models::UnitAmount, +) -> Result<(), Error<ConsumeBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_unit_amount = unit_amount; - let uri_str = format!("{}/barcode/{id}/consume", configuration.base_path, id=p_id.to_string()); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/barcode/{id}/consume", + configuration.base_path, + id = p_id.to_string() + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -83,7 +105,10 @@ pub async fn consume_barcode(configuration: &configuration::Configuration, id: m } else { let content = resp.text().await?; let entity: Option<ConsumeBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs b/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs index 6a59d1f..1d203c5 100644 --- a/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs +++ b/crates/rocie-client/src/apis/api_set_no_auth_user_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`login`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -42,13 +40,17 @@ pub enum ProvisionError { UnknownValue(serde_json::Value), } - -pub async fn login(configuration: &configuration::Configuration, login_info: models::LoginInfo) -> Result<(), Error<LoginError>> { +pub async fn login( + configuration: &configuration::Configuration, + login_info: models::LoginInfo, +) -> Result<(), Error<LoginError>> { // add a prefix to parameters to efficiently prevent name collisions let p_login_info = login_info; let uri_str = format!("{}/login", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -65,14 +67,21 @@ pub async fn login(configuration: &configuration::Configuration, login_info: mod } else { let content = resp.text().await?; let entity: Option<LoginError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn logout(configuration: &configuration::Configuration, ) -> Result<(), Error<LogoutError>> { - +pub async fn logout( + configuration: &configuration::Configuration, +) -> Result<(), Error<LogoutError>> { let uri_str = format!("{}/logout", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -88,17 +97,26 @@ pub async fn logout(configuration: &configuration::Configuration, ) -> Result<() } else { let content = resp.text().await?; let entity: Option<LogoutError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } /// This only works, if no users exist yet. -pub async fn provision(configuration: &configuration::Configuration, user_stub: models::UserStub) -> Result<models::UserId, Error<ProvisionError>> { +pub async fn provision( + configuration: &configuration::Configuration, + user_stub: models::UserStub, +) -> Result<models::UserId, Error<ProvisionError>> { // add a prefix to parameters to efficiently prevent name collisions let p_user_stub = user_stub; let uri_str = format!("{}/provision", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -120,13 +138,24 @@ pub async fn provision(configuration: &configuration::Configuration, user_stub: let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UserId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UserId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UserId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UserId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<ProvisionError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_product_api.rs b/crates/rocie-client/src/apis/api_set_product_api.rs index b2d65a3..0230a0f 100644 --- a/crates/rocie-client/src/apis/api_set_product_api.rs +++ b/crates/rocie-client/src/apis/api_set_product_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`associate_barcode`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -33,14 +31,23 @@ pub enum RegisterProductError { UnknownValue(serde_json::Value), } - -pub async fn associate_barcode(configuration: &configuration::Configuration, id: models::ProductId, barcode: models::Barcode) -> Result<(), Error<AssociateBarcodeError>> { +pub async fn associate_barcode( + configuration: &configuration::Configuration, + id: models::ProductId, + barcode: models::Barcode, +) -> Result<(), Error<AssociateBarcodeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_id = id; let p_barcode = barcode; - let uri_str = format!("{}/product/{id}/associate", configuration.base_path, id=p_id.to_string()); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let uri_str = format!( + "{}/product/{id}/associate", + configuration.base_path, + id = p_id.to_string() + ); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -57,16 +64,25 @@ pub async fn associate_barcode(configuration: &configuration::Configuration, id: } else { let content = resp.text().await?; let entity: Option<AssociateBarcodeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } -pub async fn register_product(configuration: &configuration::Configuration, product_stub: models::ProductStub) -> Result<models::ProductId, Error<RegisterProductError>> { +pub async fn register_product( + configuration: &configuration::Configuration, + product_stub: models::ProductStub, +) -> Result<models::ProductId, Error<RegisterProductError>> { // add a prefix to parameters to efficiently prevent name collisions let p_product_stub = product_stub; let uri_str = format!("{}/product/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -88,13 +104,24 @@ pub async fn register_product(configuration: &configuration::Configuration, prod let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProductId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProductId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::ProductId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::ProductId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterProductError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_product_parent_api.rs b/crates/rocie-client/src/apis/api_set_product_parent_api.rs index a537941..6b67802 100644 --- a/crates/rocie-client/src/apis/api_set_product_parent_api.rs +++ b/crates/rocie-client/src/apis/api_set_product_parent_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_product_parent`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -23,13 +21,17 @@ pub enum RegisterProductParentError { UnknownValue(serde_json::Value), } - -pub async fn register_product_parent(configuration: &configuration::Configuration, product_parent_stub: models::ProductParentStub) -> Result<models::ProductParentId, Error<RegisterProductParentError>> { +pub async fn register_product_parent( + configuration: &configuration::Configuration, + product_parent_stub: models::ProductParentStub, +) -> Result<models::ProductParentId, Error<RegisterProductParentError>> { // add a prefix to parameters to efficiently prevent name collisions let p_product_parent_stub = product_parent_stub; let uri_str = format!("{}/product_parent/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -51,13 +53,24 @@ pub async fn register_product_parent(configuration: &configuration::Configuratio let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ProductParentId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ProductParentId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::ProductParentId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::ProductParentId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterProductParentError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_recipe_api.rs b/crates/rocie-client/src/apis/api_set_recipe_api.rs index 519f90e..299cad0 100644 --- a/crates/rocie-client/src/apis/api_set_recipe_api.rs +++ b/crates/rocie-client/src/apis/api_set_recipe_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`add_recipe`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -23,13 +21,17 @@ pub enum AddRecipeError { UnknownValue(serde_json::Value), } - -pub async fn add_recipe(configuration: &configuration::Configuration, recipe_stub: models::RecipeStub) -> Result<models::RecipeId, Error<AddRecipeError>> { +pub async fn add_recipe( + configuration: &configuration::Configuration, + recipe_stub: models::RecipeStub, +) -> Result<models::RecipeId, Error<AddRecipeError>> { // add a prefix to parameters to efficiently prevent name collisions let p_recipe_stub = recipe_stub; let uri_str = format!("{}/recipe/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -51,13 +53,24 @@ pub async fn add_recipe(configuration: &configuration::Configuration, recipe_stu let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RecipeId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RecipeId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::RecipeId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::RecipeId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<AddRecipeError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_unit_api.rs b/crates/rocie-client/src/apis/api_set_unit_api.rs index 1c64bfb..93868f5 100644 --- a/crates/rocie-client/src/apis/api_set_unit_api.rs +++ b/crates/rocie-client/src/apis/api_set_unit_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_unit`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -23,13 +21,17 @@ pub enum RegisterUnitError { UnknownValue(serde_json::Value), } - -pub async fn register_unit(configuration: &configuration::Configuration, unit_stub: models::UnitStub) -> Result<models::UnitId, Error<RegisterUnitError>> { +pub async fn register_unit( + configuration: &configuration::Configuration, + unit_stub: models::UnitStub, +) -> Result<models::UnitId, Error<RegisterUnitError>> { // add a prefix to parameters to efficiently prevent name collisions let p_unit_stub = unit_stub; let uri_str = format!("{}/unit/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -51,13 +53,24 @@ pub async fn register_unit(configuration: &configuration::Configuration, unit_st let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UnitId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UnitId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterUnitError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/api_set_unit_property_api.rs b/crates/rocie-client/src/apis/api_set_unit_property_api.rs index 35398bc..883ab06 100644 --- a/crates/rocie-client/src/apis/api_set_unit_property_api.rs +++ b/crates/rocie-client/src/apis/api_set_unit_property_api.rs @@ -8,12 +8,10 @@ * Generated by: https://openapi-generator.tech */ - +use super::{ContentType, Error, configuration}; +use crate::{apis::ResponseContent, models}; use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; -use crate::{apis::ResponseContent, models}; -use super::{Error, configuration, ContentType}; - /// struct for typed errors of method [`register_unit_property`] #[derive(Debug, Clone, Serialize, Deserialize)] @@ -23,13 +21,17 @@ pub enum RegisterUnitPropertyError { UnknownValue(serde_json::Value), } - -pub async fn register_unit_property(configuration: &configuration::Configuration, unit_property_stub: models::UnitPropertyStub) -> Result<models::UnitPropertyId, Error<RegisterUnitPropertyError>> { +pub async fn register_unit_property( + configuration: &configuration::Configuration, + unit_property_stub: models::UnitPropertyStub, +) -> Result<models::UnitPropertyId, Error<RegisterUnitPropertyError>> { // add a prefix to parameters to efficiently prevent name collisions let p_unit_property_stub = unit_property_stub; let uri_str = format!("{}/unit-property/new", configuration.base_path); - let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + let mut req_builder = configuration + .client + .request(reqwest::Method::POST, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); @@ -51,13 +53,24 @@ pub async fn register_unit_property(configuration: &configuration::Configuration let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), - ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UnitPropertyId`"))), - ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UnitPropertyId`")))), + ContentType::Text => { + return Err(Error::from(serde_json::Error::custom( + "Received `text/plain` content type response that cannot be converted to `models::UnitPropertyId`", + ))); + } + ContentType::Unsupported(unknown_type) => { + return Err(Error::from(serde_json::Error::custom(format!( + "Received `{unknown_type}` content type response that cannot be converted to `models::UnitPropertyId`" + )))); + } } } else { let content = resp.text().await?; let entity: Option<RegisterUnitPropertyError> = serde_json::from_str(&content).ok(); - Err(Error::ResponseError(ResponseContent { status, content, entity })) + Err(Error::ResponseError(ResponseContent { + status, + content, + entity, + })) } } - diff --git a/crates/rocie-client/src/apis/configuration.rs b/crates/rocie-client/src/apis/configuration.rs index c143926..d576aef 100644 --- a/crates/rocie-client/src/apis/configuration.rs +++ b/crates/rocie-client/src/apis/configuration.rs @@ -35,7 +35,10 @@ impl Configuration { impl Default for Configuration { fn default() -> Self { - let client = reqwest::Client::builder().cookie_store(true).build().expect("to be not missconfigured"); + let client = reqwest::Client::builder() + .cookie_store(true) + .build() + .expect("to be not missconfigured"); Configuration { base_path: "http://localhost".to_owned(), diff --git a/crates/rocie-client/src/apis/mod.rs b/crates/rocie-client/src/apis/mod.rs index e1b12e3..dd7464f 100644 --- a/crates/rocie-client/src/apis/mod.rs +++ b/crates/rocie-client/src/apis/mod.rs @@ -16,7 +16,7 @@ pub enum Error<T> { ResponseError(ResponseContent<T>), } -impl <T> fmt::Display for Error<T> { +impl<T> fmt::Display for Error<T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -28,7 +28,7 @@ impl <T> fmt::Display for Error<T> { } } -impl <T: fmt::Debug> error::Error for Error<T> { +impl<T: fmt::Debug> error::Error for Error<T> { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -39,19 +39,19 @@ impl <T: fmt::Debug> error::Error for Error<T> { } } -impl <T> From<reqwest::Error> for Error<T> { +impl<T> From<reqwest::Error> for Error<T> { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl <T> From<serde_json::Error> for Error<T> { +impl<T> From<serde_json::Error> for Error<T> { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl <T> From<std::io::Error> for Error<T> { +impl<T> From<std::io::Error> for Error<T> { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -78,8 +78,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } @@ -96,7 +98,7 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String enum ContentType { Json, Text, - Unsupported(String) + Unsupported(String), } impl From<&str> for ContentType { diff --git a/crates/rocie-client/src/implies.rs b/crates/rocie-client/src/implies.rs index 4b4091c..5957942 100644 --- a/crates/rocie-client/src/implies.rs +++ b/crates/rocie-client/src/implies.rs @@ -1,6 +1,8 @@ use std::fmt::Display; -use crate::models::{BarcodeId, ProductId, ProductParentId, RecipeId, UnitId, UnitPropertyId, UserId}; +use crate::models::{ + BarcodeId, ProductId, ProductParentId, RecipeId, UnitId, UnitPropertyId, UserId, +}; // TODO(@bpeetz): The client generator should just do this. <2025-09-23> diff --git a/crates/rocie-client/src/lib.rs b/crates/rocie-client/src/lib.rs index bbd0eed..5d2d948 100644 --- a/crates/rocie-client/src/lib.rs +++ b/crates/rocie-client/src/lib.rs @@ -1,12 +1,12 @@ #![allow(unused_imports)] #![allow(clippy::too_many_arguments)] -extern crate serde_repr; +extern crate reqwest; extern crate serde; extern crate serde_json; +extern crate serde_repr; extern crate url; -extern crate reqwest; pub mod apis; -pub mod models; pub mod implies; +pub mod models; diff --git a/crates/rocie-client/src/models/bar_code.rs b/crates/rocie-client/src/models/bar_code.rs index c8123a2..efe4683 100644 --- a/crates/rocie-client/src/models/bar_code.rs +++ b/crates/rocie-client/src/models/bar_code.rs @@ -19,9 +19,6 @@ pub struct BarCode { impl BarCode { pub fn new(id: i64) -> BarCode { - BarCode { - id, - } + BarCode { id } } } - diff --git a/crates/rocie-client/src/models/barcode.rs b/crates/rocie-client/src/models/barcode.rs index f44caa9..ca950cd 100644 --- a/crates/rocie-client/src/models/barcode.rs +++ b/crates/rocie-client/src/models/barcode.rs @@ -21,10 +21,6 @@ pub struct Barcode { impl Barcode { pub fn new(amount: models::UnitAmount, id: models::BarcodeId) -> Barcode { - Barcode { - amount, - id, - } + Barcode { amount, id } } } - diff --git a/crates/rocie-client/src/models/barcode_id.rs b/crates/rocie-client/src/models/barcode_id.rs index a081913..581c07d 100644 --- a/crates/rocie-client/src/models/barcode_id.rs +++ b/crates/rocie-client/src/models/barcode_id.rs @@ -19,9 +19,6 @@ pub struct BarcodeId { impl BarcodeId { pub fn new(value: u32) -> BarcodeId { - BarcodeId { - value, - } + BarcodeId { value } } } - diff --git a/crates/rocie-client/src/models/login_info.rs b/crates/rocie-client/src/models/login_info.rs index 5aef74e..1f9215b 100644 --- a/crates/rocie-client/src/models/login_info.rs +++ b/crates/rocie-client/src/models/login_info.rs @@ -23,10 +23,6 @@ pub struct LoginInfo { impl LoginInfo { pub fn new(id: models::UserId, password: String) -> LoginInfo { - LoginInfo { - id, - password, - } + LoginInfo { id, password } } } - diff --git a/crates/rocie-client/src/models/password_hash.rs b/crates/rocie-client/src/models/password_hash.rs index 31413bf..b73a944 100644 --- a/crates/rocie-client/src/models/password_hash.rs +++ b/crates/rocie-client/src/models/password_hash.rs @@ -21,9 +21,6 @@ pub struct PasswordHash { impl PasswordHash { /// This is stored as an PHC password string. This type corresponds to the string representation of a PHC string as described in the [PHC string format specification][1]. PHC strings have the following format: ```text $<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]] ``` pub fn new(value: String) -> PasswordHash { - PasswordHash { - value, - } + PasswordHash { value } } } - diff --git a/crates/rocie-client/src/models/product.rs b/crates/rocie-client/src/models/product.rs index 2ab9445..e2546e0 100644 --- a/crates/rocie-client/src/models/product.rs +++ b/crates/rocie-client/src/models/product.rs @@ -36,7 +36,12 @@ pub struct Product { impl Product { /// The base of rocie. Products can be bought and consumed and represent, what you actually have in storage. Not every product is bought, as some can also be obtained by cooking a recipe. - pub fn new(associated_bar_codes: Vec<models::Barcode>, id: models::ProductId, name: String, unit_property: models::UnitPropertyId) -> Product { + pub fn new( + associated_bar_codes: Vec<models::Barcode>, + id: models::ProductId, + name: String, + unit_property: models::UnitPropertyId, + ) -> Product { Product { associated_bar_codes, description: None, @@ -47,4 +52,3 @@ impl Product { } } } - diff --git a/crates/rocie-client/src/models/product_amount.rs b/crates/rocie-client/src/models/product_amount.rs index 43ab725..66e967b 100644 --- a/crates/rocie-client/src/models/product_amount.rs +++ b/crates/rocie-client/src/models/product_amount.rs @@ -21,10 +21,6 @@ pub struct ProductAmount { impl ProductAmount { pub fn new(amount: models::UnitAmount, product_id: models::ProductId) -> ProductAmount { - ProductAmount { - amount, - product_id, - } + ProductAmount { amount, product_id } } } - diff --git a/crates/rocie-client/src/models/product_id.rs b/crates/rocie-client/src/models/product_id.rs index 0f65bb8..0f0c3db 100644 --- a/crates/rocie-client/src/models/product_id.rs +++ b/crates/rocie-client/src/models/product_id.rs @@ -19,9 +19,6 @@ pub struct ProductId { impl ProductId { pub fn new(value: uuid::Uuid) -> ProductId { - ProductId { - value, - } + ProductId { value } } } - diff --git a/crates/rocie-client/src/models/product_one_of.rs b/crates/rocie-client/src/models/product_one_of.rs index 399c06b..e8763d6 100644 --- a/crates/rocie-client/src/models/product_one_of.rs +++ b/crates/rocie-client/src/models/product_one_of.rs @@ -19,9 +19,6 @@ pub struct ProductOneOf { impl ProductOneOf { pub fn new(mass: i64) -> ProductOneOf { - ProductOneOf { - mass, - } + ProductOneOf { mass } } } - diff --git a/crates/rocie-client/src/models/product_one_of_1.rs b/crates/rocie-client/src/models/product_one_of_1.rs index 58e033f..cc7a865 100644 --- a/crates/rocie-client/src/models/product_one_of_1.rs +++ b/crates/rocie-client/src/models/product_one_of_1.rs @@ -19,9 +19,6 @@ pub struct ProductOneOf1 { impl ProductOneOf1 { pub fn new(volume: i64) -> ProductOneOf1 { - ProductOneOf1 { - volume, - } + ProductOneOf1 { volume } } } - diff --git a/crates/rocie-client/src/models/product_parent.rs b/crates/rocie-client/src/models/product_parent.rs index 7ce26c9..79aec15 100644 --- a/crates/rocie-client/src/models/product_parent.rs +++ b/crates/rocie-client/src/models/product_parent.rs @@ -39,4 +39,3 @@ impl ProductParent { } } } - diff --git a/crates/rocie-client/src/models/product_parent_id.rs b/crates/rocie-client/src/models/product_parent_id.rs index 1305117..9701ab3 100644 --- a/crates/rocie-client/src/models/product_parent_id.rs +++ b/crates/rocie-client/src/models/product_parent_id.rs @@ -19,9 +19,6 @@ pub struct ProductParentId { impl ProductParentId { pub fn new(value: uuid::Uuid) -> ProductParentId { - ProductParentId { - value, - } + ProductParentId { value } } } - diff --git a/crates/rocie-client/src/models/product_parent_stub.rs b/crates/rocie-client/src/models/product_parent_stub.rs index a874502..878762e 100644 --- a/crates/rocie-client/src/models/product_parent_stub.rs +++ b/crates/rocie-client/src/models/product_parent_stub.rs @@ -33,4 +33,3 @@ impl ProductParentStub { } } } - diff --git a/crates/rocie-client/src/models/product_stub.rs b/crates/rocie-client/src/models/product_stub.rs index 76bc086..2332d0f 100644 --- a/crates/rocie-client/src/models/product_stub.rs +++ b/crates/rocie-client/src/models/product_stub.rs @@ -37,4 +37,3 @@ impl ProductStub { } } } - diff --git a/crates/rocie-client/src/models/recipe.rs b/crates/rocie-client/src/models/recipe.rs index 81cb6bd..e3b9d56 100644 --- a/crates/rocie-client/src/models/recipe.rs +++ b/crates/rocie-client/src/models/recipe.rs @@ -23,11 +23,6 @@ pub struct Recipe { impl Recipe { pub fn new(content: String, id: models::RecipeId, path: String) -> Recipe { - Recipe { - content, - id, - path, - } + Recipe { content, id, path } } } - diff --git a/crates/rocie-client/src/models/recipe_id.rs b/crates/rocie-client/src/models/recipe_id.rs index 7d13aed..f08b956 100644 --- a/crates/rocie-client/src/models/recipe_id.rs +++ b/crates/rocie-client/src/models/recipe_id.rs @@ -19,9 +19,6 @@ pub struct RecipeId { impl RecipeId { pub fn new(value: uuid::Uuid) -> RecipeId { - RecipeId { - value, - } + RecipeId { value } } } - diff --git a/crates/rocie-client/src/models/recipe_stub.rs b/crates/rocie-client/src/models/recipe_stub.rs index e8e9c63..205faa6 100644 --- a/crates/rocie-client/src/models/recipe_stub.rs +++ b/crates/rocie-client/src/models/recipe_stub.rs @@ -23,10 +23,6 @@ pub struct RecipeStub { impl RecipeStub { pub fn new(content: String, path: String) -> RecipeStub { - RecipeStub { - content, - path, - } + RecipeStub { content, path } } } - diff --git a/crates/rocie-client/src/models/unit.rs b/crates/rocie-client/src/models/unit.rs index 873cb33..229866d 100644 --- a/crates/rocie-client/src/models/unit.rs +++ b/crates/rocie-client/src/models/unit.rs @@ -34,7 +34,13 @@ pub struct Unit { } impl Unit { - pub fn new(full_name_plural: String, full_name_singular: String, id: models::UnitId, short_name: String, unit_property: models::UnitPropertyId) -> Unit { + pub fn new( + full_name_plural: String, + full_name_singular: String, + id: models::UnitId, + short_name: String, + unit_property: models::UnitPropertyId, + ) -> Unit { Unit { description: None, full_name_plural, @@ -45,4 +51,3 @@ impl Unit { } } } - diff --git a/crates/rocie-client/src/models/unit_amount.rs b/crates/rocie-client/src/models/unit_amount.rs index e4b1a54..a8e4254 100644 --- a/crates/rocie-client/src/models/unit_amount.rs +++ b/crates/rocie-client/src/models/unit_amount.rs @@ -21,10 +21,6 @@ pub struct UnitAmount { impl UnitAmount { pub fn new(unit: models::UnitId, value: u32) -> UnitAmount { - UnitAmount { - unit, - value, - } + UnitAmount { unit, value } } } - diff --git a/crates/rocie-client/src/models/unit_id.rs b/crates/rocie-client/src/models/unit_id.rs index 8b08d95..5a09994 100644 --- a/crates/rocie-client/src/models/unit_id.rs +++ b/crates/rocie-client/src/models/unit_id.rs @@ -19,9 +19,6 @@ pub struct UnitId { impl UnitId { pub fn new(value: uuid::Uuid) -> UnitId { - UnitId { - value, - } + UnitId { value } } } - diff --git a/crates/rocie-client/src/models/unit_property.rs b/crates/rocie-client/src/models/unit_property.rs index b4dfbe1..bfe5d9c 100644 --- a/crates/rocie-client/src/models/unit_property.rs +++ b/crates/rocie-client/src/models/unit_property.rs @@ -30,7 +30,11 @@ pub struct UnitProperty { impl UnitProperty { /// An unit property describes a property that can be measured by units. For example velocity, mass or volume. - pub fn new(id: models::UnitPropertyId, name: String, units: Vec<models::UnitId>) -> UnitProperty { + pub fn new( + id: models::UnitPropertyId, + name: String, + units: Vec<models::UnitId>, + ) -> UnitProperty { UnitProperty { description: None, id, @@ -39,4 +43,3 @@ impl UnitProperty { } } } - diff --git a/crates/rocie-client/src/models/unit_property_id.rs b/crates/rocie-client/src/models/unit_property_id.rs index aca567c..6e9e50e 100644 --- a/crates/rocie-client/src/models/unit_property_id.rs +++ b/crates/rocie-client/src/models/unit_property_id.rs @@ -19,9 +19,6 @@ pub struct UnitPropertyId { impl UnitPropertyId { pub fn new(value: uuid::Uuid) -> UnitPropertyId { - UnitPropertyId { - value, - } + UnitPropertyId { value } } } - diff --git a/crates/rocie-client/src/models/unit_property_stub.rs b/crates/rocie-client/src/models/unit_property_stub.rs index c43d91e..37ccb64 100644 --- a/crates/rocie-client/src/models/unit_property_stub.rs +++ b/crates/rocie-client/src/models/unit_property_stub.rs @@ -29,4 +29,3 @@ impl UnitPropertyStub { } } } - diff --git a/crates/rocie-client/src/models/unit_stub.rs b/crates/rocie-client/src/models/unit_stub.rs index 162674f..accad53 100644 --- a/crates/rocie-client/src/models/unit_stub.rs +++ b/crates/rocie-client/src/models/unit_stub.rs @@ -26,7 +26,12 @@ pub struct UnitStub { } impl UnitStub { - pub fn new(full_name_plural: String, full_name_singular: String, short_name: String, unit_property: models::UnitPropertyId) -> UnitStub { + pub fn new( + full_name_plural: String, + full_name_singular: String, + short_name: String, + unit_property: models::UnitPropertyId, + ) -> UnitStub { UnitStub { description: None, full_name_plural, @@ -36,4 +41,3 @@ impl UnitStub { } } } - diff --git a/crates/rocie-client/src/models/user.rs b/crates/rocie-client/src/models/user.rs index 7397275..d7bdb99 100644 --- a/crates/rocie-client/src/models/user.rs +++ b/crates/rocie-client/src/models/user.rs @@ -39,4 +39,3 @@ impl User { } } } - diff --git a/crates/rocie-client/src/models/user_id.rs b/crates/rocie-client/src/models/user_id.rs index 3a67fd6..677fb37 100644 --- a/crates/rocie-client/src/models/user_id.rs +++ b/crates/rocie-client/src/models/user_id.rs @@ -19,9 +19,6 @@ pub struct UserId { impl UserId { pub fn new(value: uuid::Uuid) -> UserId { - UserId { - value, - } + UserId { value } } } - diff --git a/crates/rocie-client/src/models/user_stub.rs b/crates/rocie-client/src/models/user_stub.rs index 8f620db..e49b034 100644 --- a/crates/rocie-client/src/models/user_stub.rs +++ b/crates/rocie-client/src/models/user_stub.rs @@ -33,4 +33,3 @@ impl UserStub { } } } - |
