This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unused using, Reorganized using, moved the class to separate …
…file, removed commented code in Catalog.API
- Loading branch information
1 parent
b8431fa
commit 34241c4
Showing
15 changed files
with
72 additions
and
72 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/Services/Basket/Basket.FunctionalTests/Base/BasketTestStartup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
namespace Microsoft.eShopOnContainers.Services.Catalog.API | ||
{ | ||
|
||
public class CatalogSettings | ||
{ | ||
public string PicBaseUrl { get;set;} | ||
public string PicBaseUrl { get; set; } | ||
|
||
public string EventBusConnection { get; set; } | ||
|
||
public bool UseCustomizationData { get; set; } | ||
public bool AzureStorageEnabled { get; set; } | ||
|
||
public bool AzureStorageEnabled { get; set; } | ||
} | ||
|
||
} |
7 changes: 1 addition & 6 deletions
7
src/Services/Catalog/Catalog.API/Extensions/CatalogItemExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
src/Services/Catalog/Catalog.API/Extensions/HostExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Services/Catalog/Catalog.API/Extensions/WebHostExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...tionEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...og.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Services/Catalog/Catalog.API/IntegrationEvents/Events/OrderStockItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events | ||
{ | ||
public class OrderStockItem | ||
{ | ||
public int ProductId { get; } | ||
public int Units { get; } | ||
|
||
public OrderStockItem(int productId, int units) | ||
{ | ||
ProductId = productId; | ||
Units = units; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,69 @@ | ||
syntax = "proto3"; | ||
|
||
/* >> | ||
import "google/api/annotations.proto"; | ||
<< */ | ||
|
||
|
||
package CatalogApi; | ||
|
||
message CatalogItemRequest { | ||
int32 id = 1; | ||
} | ||
|
||
message CatalogItemsRequest { | ||
string ids = 1; | ||
|
||
int32 pageSize = 2; | ||
|
||
int32 pageIndex = 3; | ||
} | ||
|
||
message CatalogItemResponse { | ||
int32 id = 1; | ||
|
||
string name = 2; | ||
string description=3; | ||
double price=4; | ||
string picture_file_name=5; | ||
string picture_uri=6; | ||
CatalogType catalog_type=8; | ||
CatalogBrand catalog_brand=10; | ||
int32 available_stock=11; | ||
int32 restock_threshold=12; | ||
int32 max_stock_threshold=13; | ||
bool on_reorder=14; | ||
|
||
string description=3; | ||
|
||
double price=4; | ||
|
||
string picture_file_name=5; | ||
|
||
string picture_uri=6; | ||
|
||
CatalogType catalog_type=8; | ||
|
||
CatalogBrand catalog_brand=10; | ||
|
||
int32 available_stock=11; | ||
|
||
int32 restock_threshold=12; | ||
|
||
int32 max_stock_threshold=13; | ||
|
||
bool on_reorder=14; | ||
} | ||
|
||
message CatalogBrand { | ||
int32 id = 1; | ||
|
||
string name = 2; | ||
} | ||
|
||
message CatalogType { | ||
int32 id = 1; | ||
|
||
string type = 2; | ||
} | ||
|
||
message PaginatedItemsResponse { | ||
int32 pageIndex = 1; | ||
|
||
int32 pageSize = 2; | ||
|
||
int64 count = 3; | ||
|
||
repeated CatalogItemResponse data = 4; | ||
} | ||
|
||
service Catalog { | ||
rpc GetItemById (CatalogItemRequest) returns (CatalogItemResponse) { | ||
/* >> | ||
option (google.api.http) = { | ||
get: "/api/v1/catalog/items/{id}" | ||
}; | ||
<< */ | ||
} | ||
rpc GetItemById (CatalogItemRequest) returns (CatalogItemResponse) {} | ||
|
||
rpc GetItemsByIds (CatalogItemsRequest) returns (PaginatedItemsResponse) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters