Compare commits
No commits in common. "develop" and "master" have entirely different histories.
@ -1,6 +0,0 @@
|
||||
@LiberIncantamentum.API_HostAddress = http://localhost:5196
|
||||
|
||||
GET {{LiberIncantamentum.API_HostAddress}}/weatherforecast/
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,25 +1,9 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36109.1
|
||||
VisualStudioVersion = 17.14.36109.1 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{93BEE101-D8F6-4622-95B6-E135AA9C066E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.API", "LiberIncantamentum.API\Liber_Incantamentum.API.csproj", "{8B578810-E61F-4C5D-89B0-DE62B85346F7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Domain", "LiberIncantamentum.Domain\Liber_Incantamentum.Domain.csproj", "{0B68D83C-1751-427D-840D-1285A3DB98D0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Infrastructure", "LiberIncantamentum.Infrastructure\Liber_Incantamentum.Infrastructure.csproj", "{8D09ADAE-591C-4487-924F-2339D29EE60D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.Application", "LiberIncantamentum.Application\Liber_Incantamentum.Application.csproj", "{20EAEB50-C4FD-4A2D-92CC-8D0241556617}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.UnitTests", "LiberIncantamentum.UnitTests\Liber_Incantamentum.UnitTests.csproj", "{B829A2A1-9366-422B-B372-5DDA33BD2690}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.FunctionalTests", "Liber_Incantamentum.FunctionnalTests\Liber_Incantamentum.FunctionalTests.csproj", "{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum.IntegrationTests", "Liber_Incantamentum.IntegrationTests\Liber_Incantamentum.IntegrationTests.csproj", "{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liber_Incantamentum", "Liber_Incantamentum\Liber_Incantamentum.csproj", "{BB761821-A9EC-4EBA-83A2-89F32C50041F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -27,47 +11,14 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8B578810-E61F-4C5D-89B0-DE62B85346F7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0B68D83C-1751-427D-840D-1285A3DB98D0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D09ADAE-591C-4487-924F-2339D29EE60D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20EAEB50-C4FD-4A2D-92CC-8D0241556617}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B829A2A1-9366-422B-B372-5DDA33BD2690}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BB761821-A9EC-4EBA-83A2-89F32C50041F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{8B578810-E61F-4C5D-89B0-DE62B85346F7} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{0B68D83C-1751-427D-840D-1285A3DB98D0} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{8D09ADAE-591C-4487-924F-2339D29EE60D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{20EAEB50-C4FD-4A2D-92CC-8D0241556617} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
||||
{B829A2A1-9366-422B-B372-5DDA33BD2690} = {93BEE101-D8F6-4622-95B6-E135AA9C066E}
|
||||
{8F1D203C-1A76-4E76-AFC9-7B7477EB143E} = {93BEE101-D8F6-4622-95B6-E135AA9C066E}
|
||||
{F36ABF3F-5707-463C-BC33-DF8A261E4B5A} = {93BEE101-D8F6-4622-95B6-E135AA9C066E}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B7CB31CD-9866-48CB-8A83-9F2EB1E9E53B}
|
||||
EndGlobalSection
|
||||
|
||||
33
Liber_Incantamentum/Controllers/WeatherForecastController.cs
Normal file
33
Liber_Incantamentum/Controllers/WeatherForecastController.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Liber_Incantamentum.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
private readonly ILogger<WeatherForecastController> _logger;
|
||||
|
||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet(Name = "GetWeatherForecast")]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,11 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.7" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
6
Liber_Incantamentum/Liber_Incantamentum.http
Normal file
6
Liber_Incantamentum/Liber_Incantamentum.http
Normal file
@ -0,0 +1,6 @@
|
||||
@Liber_Incantamentum_HostAddress = http://localhost:5225
|
||||
|
||||
GET {{Liber_Incantamentum_HostAddress}}/weatherforecast/
|
||||
Accept: application/json
|
||||
|
||||
###
|
||||
@ -5,7 +5,7 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "http://localhost:5196",
|
||||
"applicationUrl": "http://localhost:5225",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "https://localhost:7236;http://localhost:5196",
|
||||
"applicationUrl": "https://localhost:7239;http://localhost:5225",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
13
Liber_Incantamentum/WeatherForecast.cs
Normal file
13
Liber_Incantamentum/WeatherForecast.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Liber_Incantamentum
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
}
|
||||
41
README.md
41
README.md
@ -38,14 +38,14 @@ Développer une API professionnelle respectant les bonnes pratiques modernes :
|
||||
Liber_Incantamentum/
|
||||
│
|
||||
├── src/
|
||||
│ ├── Liber_Incantamentum.Api/
|
||||
│ ├── Liber_Incantamentum.Application/
|
||||
│ ├── Liber_Incantamentum.Domain/
|
||||
│ └── Liber_Incantamentum.Infrastructure/
|
||||
│ ├── Liber_Incantamentum.Api/ → API (controllers, middlewares)
|
||||
│ ├── Liber_Incantamentum.Application/ → Use cases (logique métier)
|
||||
│ ├── Liber_Incantamentum.Domain/ → Entités, Enums, Interfaces
|
||||
│ └── Liber_Incantamentum.Infrastructure/ → Persistance (ex: EF Core)
|
||||
│
|
||||
└── tests/
|
||||
├── Liber_Incantamentum.Tests.Unit/
|
||||
└── Liber_Incantamentum.Tests.Integration/
|
||||
├── Liber_Incantamentum.Tests.Unit/ → Tests unitaires
|
||||
└── Liber_Incantamentum.Tests.Integration/→ Tests d’intégration & sécurité
|
||||
```
|
||||
|
||||
---
|
||||
@ -118,6 +118,35 @@ Toutes les routes sont protégées par une clé API :
|
||||
|
||||
---
|
||||
|
||||
## ▶️ Lancer le projet
|
||||
|
||||
```bash
|
||||
# Compilation
|
||||
dotnet build
|
||||
|
||||
# Lancer l’API
|
||||
dotnet run --project src/Liber_Incantamentum.Api
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Lancer les tests
|
||||
|
||||
```bash
|
||||
dotnet test
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ✅ Fichiers présents à la racine
|
||||
|
||||
- `Liber_Incantamentum.sln` — Solution .NET
|
||||
- `.editorconfig` — Convention de code
|
||||
- `.gitignore` — Fichiers à ignorer
|
||||
- `README.md` — Documentation du projet
|
||||
|
||||
---
|
||||
|
||||
## ✨ Technologies utilisées
|
||||
|
||||
- C# / .NET 9
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user