Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit c907155

Browse files
author
Ramón Tomás
committed
Merge branch 'dev' into prng6
2 parents 77061fc + ab4dde1 commit c907155

File tree

123 files changed

+11804
-57863
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+11804
-57863
lines changed

.dockerignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ cli-linux
2828
**/obj/
2929
**/node_modules/
3030
**/bower_components/
31-
**/wwwroot/lib/
32-
!**/wwwroot/lib/signalr/*
33-
!**/wwwroot/lib/toastr/*
31+
**/wwwroot/lib/*
3432
global.json
3533
**/appsettings.localhost.json
3634
src/Web/WebSPA/wwwroot/

CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# How to contribute to eShopOnContainers
2+
3+
This repo is a reference and learning resource and everyone is invited to contribute, however not all PRs will be accepted into the main branch (**`dev`**).
4+
5+
There's a general development strategy that's driven by @CESARDELATORRE, who chooses, or defines criteria for choosing, the issues to include in the codebase, given a bunch of constraints and other guidelines.
6+
7+
However you can always get in touch with him, if you want to implement some general-interest feature in your repo and have it referenced from the [documentation](https://docs.microsoft.com/dotnet/standard/microservices-architecture/) or the [Microservices eBook](https://aka.ms/microservicesebook/).
8+
9+
## Coding Standards
10+
11+
There are no explicit coding standards so pay attention to the general coding style, that's (mostly) used everywhere.
12+
13+
However, there's only one **REALLY** important rule: **use spaces for indenting** 😉.
14+
15+
## Development Process
16+
17+
In order to help manage community contributions and avoid conflicts, there's a [Development project](https://github.com/dotnet-architecture/eShopOnContainers/projects/3) in this repo, to track assignments to any significant development effort.
18+
19+
Great but... **what's "significant"**?
20+
21+
That's not too easy to define and there are no clear criteria right now but, probably, changing "a couple" lines of code in one file would not qualify while changing "a bunch" of files would.
22+
23+
We'll all be learning in the process so we'll figure it out somehow.
24+
25+
### General Steps
26+
27+
1. Issues are managed as usual with the regular issues list, just like any other repo.
28+
29+
2. Once an issue is marked as a bug, enhancement, new feature or whatever needs development work, it will be labeled as a **backlog-item** and included as the last item in the Backlog project column.
30+
31+
3. Community members can propose themselves to code an issue.
32+
33+
4. @CESARDELATORRE/collaborators will prioritize the backlog items and arrange them in the **Backlog** column, so that the items in the top of the list are implemented first.
34+
35+
5. @CESARDELATORRE/collaborators will review the issues and select the ones approved to begin development with, and move them to the **Approved** column.
36+
37+
6. Issues in the **Approved** column can be assigned to a **collaborator** or to a **community member** who would then begin working on the issue and submit a PR as usual.
38+
39+
## Tests
40+
41+
There's not a tests policy in the project at this moment, but it'll be greatly appreciated if you include them within the [updated test structure](./test/readme.md).
42+
43+
## Forks and Branches
44+
45+
All contributions must be submitted as a [Pull Request (PR)](https://help.github.com/articles/about-pull-requests/) so you need to [fork this repo](https://help.github.com/articles/fork-a-repo/) on your GitHub account.
46+
47+
The main branches are **`dev`** and **`master`**:
48+
49+
- **`dev`**: Contains the latest code **and it is the branch actively developed**.
50+
**All PRs must be against `dev` branch to be considered**. This branch is developed using .NET Core 2.x
51+
52+
- **`master`**: Synced from time to time from **`dev`**. It contains "stable" code.
53+
(**Keep in mind "stable" does not mean PRODUCTION-READY!**)
54+
55+
- Any other branch is considered temporary and could be deleted at any time. Do not submit any PR to them!
56+
57+
## DISCLAIMER - This is not a PRODUCTION-READY TEMPLATE for microservices
58+
eShopOnContainers is a reference application to **showcase architectural patterns** for developing microservices applications on .NET Core. **IT IS NOT A PRODUCTION-READY TEMPLATE** to start real-world application. In fact, the application is in a **permanent beta state**, as it’s also used to test new potentially interesting technologies as they show up.
59+
60+
Since this is a learning resource, some design decisions have favored simplicity to convey a pattern, over production-grade robustness.
61+
62+
## Suggestions
63+
64+
We hope this helps us all to work better and avoid some of the problems/frustrations of working in such a large community.
65+
66+
We'd also appreciate any comments or ideas to improve this.
67+

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.1.300"
3+
"version": "2.1.401"
44
}
5-
}
5+
}

src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.AspNetCore.App" />
16-
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
16+
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
1717
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.1.0" />
1818
</ItemGroup>
1919

src/ApiGateways/Mobile.Bff.Shopping/aggregator/Startup.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
using Microsoft.AspNetCore.Authentication.JwtBearer;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IdentityModel.Tokens.Jwt;
4+
using System.Net.Http;
5+
using Microsoft.AspNetCore.Authentication.JwtBearer;
26
using Microsoft.AspNetCore.Builder;
37
using Microsoft.AspNetCore.Hosting;
48
using Microsoft.AspNetCore.Http;
@@ -12,10 +16,6 @@
1216
using Polly;
1317
using Polly.Extensions.Http;
1418
using Swashbuckle.AspNetCore.Swagger;
15-
using System;
16-
using System.Collections.Generic;
17-
using System.IdentityModel.Tokens.Jwt;
18-
using System.Net.Http;
1919

2020
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator
2121
{
@@ -61,7 +61,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
6161
app.UseSwagger().UseSwaggerUI(c =>
6262
{
6363
c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "Purchase BFF V1");
64-
c.ConfigureOAuth2("Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregatorwaggerui", "", "", "Purchase BFF Swagger UI");
64+
65+
c.OAuthClientId("Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregatorwaggerui");
66+
c.OAuthClientSecret(string.Empty);
67+
c.OAuthRealm(string.Empty);
68+
c.OAuthAppName("Purchase BFF Swagger UI");
6569
});
6670
}
6771
}
@@ -130,11 +134,9 @@ public static IServiceCollection AddCustomAuthentication(this IServiceCollection
130134
{
131135
OnAuthenticationFailed = async ctx =>
132136
{
133-
int i = 0;
134137
},
135138
OnTokenValidated = async ctx =>
136139
{
137-
int i = 0;
138140
}
139141
};
140142
});
@@ -166,15 +168,16 @@ public static IServiceCollection AddHttpServices(this IServiceCollection service
166168
return services;
167169
}
168170

169-
static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy()
171+
private static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy()
170172
{
171173
return HttpPolicyExtensions
172174
.HandleTransientHttpError()
173175
.OrResult(msg => msg.StatusCode == System.Net.HttpStatusCode.NotFound)
174176
.WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)));
175177

176178
}
177-
static IAsyncPolicy<HttpResponseMessage> GetCircuitBreakerPolicy()
179+
180+
private static IAsyncPolicy<HttpResponseMessage> GetCircuitBreakerPolicy()
178181
{
179182
return HttpPolicyExtensions
180183
.HandleTransientHttpError()

src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313

1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
16-
<PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
17-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="2.4.0" />
16+
<PackageReference Include="Swashbuckle.AspNetCore" Version="3.0.0" />
1817
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="2.1.0" />
1918
</ItemGroup>
2019

0 commit comments

Comments
 (0)