Skip to content

Commit d05ab64

Browse files
committed
feat: initial commit
0 parents  commit d05ab64

File tree

13 files changed

+854
-0
lines changed

13 files changed

+854
-0
lines changed

.editorconfig

Lines changed: 379 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
bld/
21+
[Bb]in/
22+
[Oo]bj/
23+
24+
# Visual Studio 2015 cache/options directory
25+
.vs/
26+
# Uncomment if you have tasks that create the project's static files in wwwroot
27+
#wwwroot/
28+
29+
# MSTest test Results
30+
[Tt]est[Rr]esult*/
31+
[Bb]uild[Ll]og.*
32+
33+
# NUNIT
34+
*.VisualState.xml
35+
TestResult.xml
36+
37+
# Build Results of an ATL Project
38+
[Dd]ebugPS/
39+
[Rr]eleasePS/
40+
dlldata.c
41+
42+
# DNX
43+
project.lock.json
44+
artifacts/
45+
46+
*_i.c
47+
*_p.c
48+
*_i.h
49+
*.ilk
50+
*.meta
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.tmp_proj
63+
*.log
64+
*.vspscc
65+
*.vssscc
66+
.builds
67+
*.pidb
68+
*.svclog
69+
*.scc
70+
71+
# Chutzpah Test files
72+
_Chutzpah*
73+
74+
# Visual C++ cache files
75+
ipch/
76+
*.aps
77+
*.ncb
78+
*.opendb
79+
*.opensdf
80+
*.sdf
81+
*.cachefile
82+
83+
# Visual Studio profiler
84+
*.psess
85+
*.vsp
86+
*.vspx
87+
*.sap
88+
89+
# TFS 2012 Local Workspace
90+
$tf/
91+
92+
# Guidance Automation Toolkit
93+
*.gpState
94+
95+
# ReSharper is a .NET coding add-in
96+
_ReSharper*/
97+
*.[Rr]e[Ss]harper
98+
*.DotSettings.user
99+
100+
# JustCode is a .NET coding add-in
101+
.JustCode
102+
103+
# TeamCity is a build add-in
104+
_TeamCity*
105+
106+
# DotCover is a Code Coverage Tool
107+
*.dotCover
108+
109+
# NCrunch
110+
_NCrunch_*
111+
.*crunch*.local.xml
112+
nCrunchTemp_*
113+
114+
# MightyMoose
115+
*.mm.*
116+
AutoTest.Net/
117+
118+
# Web workbench (sass)
119+
.sass-cache/
120+
121+
# Installshield output folder
122+
[Ee]xpress/
123+
124+
# DocProject is a documentation generator add-in
125+
DocProject/buildhelp/
126+
DocProject/Help/*.HxT
127+
DocProject/Help/*.HxC
128+
DocProject/Help/*.hhc
129+
DocProject/Help/*.hhk
130+
DocProject/Help/*.hhp
131+
DocProject/Help/Html2
132+
DocProject/Help/html
133+
134+
# Click-Once directory
135+
publish/
136+
137+
# Publish Web Output
138+
# publish profiles are used to deploy databases, uncomment the following line if you don't want to commit them
139+
#*.[Pp]ublish.xml
140+
*.azurePubxml
141+
# TODO: Comment the next line if you want to checkin your web deploy settings
142+
# but database connection strings (with potential passwords) will be unencrypted
143+
*.pubxml
144+
*.publishproj
145+
146+
# NuGet Packages
147+
*.nupkg
148+
# The packages folder can be ignored because of Package Restore
149+
**/packages/*
150+
# except build/, which is used as an MSBuild target.
151+
!**/packages/build/
152+
# Uncomment if necessary however generally it will be regenerated when needed
153+
#!**/packages/repositories.config
154+
# NuGet v3's project.json files produces more ignoreable files
155+
*.nuget.props
156+
*.nuget.targets
157+
158+
# Microsoft Azure Build Output
159+
csx/
160+
*.build.csdef
161+
162+
# Microsoft Azure Emulator
163+
ecf/
164+
rcf/
165+
166+
# Microsoft Azure ApplicationInsights config file
167+
ApplicationInsights.config
168+
169+
# Windows Store app package directory
170+
AppPackages/
171+
BundleArtifacts/
172+
173+
# Visual Studio cache files
174+
# files ending in .cache can be ignored
175+
*.[Cc]ache
176+
# but keep track of directories ending in .cache
177+
!*.[Cc]ache/
178+
179+
# Others
180+
ClientBin/
181+
~$*
182+
*~
183+
*.dbmdl
184+
*.dbproj.schemaview
185+
*.pfx
186+
*.publishsettings
187+
node_modules/
188+
orleans.codegen.cs
189+
190+
# RIA/Silverlight projects
191+
Generated_Code/
192+
193+
# Backup & report files from converting an old project file
194+
# to a newer Visual Studio version. Backup files are not needed,
195+
# because we have git ;-)
196+
_UpgradeReport_Files/
197+
Backup*/
198+
UpgradeLog*.XML
199+
UpgradeLog*.htm
200+
201+
# SQL Server files
202+
*.mdf
203+
*.ldf
204+
205+
# Business Intelligence projects
206+
*.rdl.data
207+
*.bim.layout
208+
*.bim_*.settings
209+
210+
# Microsoft Fakes
211+
FakesAssemblies/
212+
213+
# GhostDoc plugin setting file
214+
*.GhostDoc.xml
215+
216+
# Node.js Tools for Visual Studio
217+
.ntvs_analysis.dat
218+
219+
# Visual Studio 6 build log
220+
*.plg
221+
222+
# Visual Studio 6 workspace options file
223+
*.opt
224+
225+
# Visual Studio LightSwitch build output
226+
**/*.HTMLClient/GeneratedArtifacts
227+
**/*.DesktopClient/GeneratedArtifacts
228+
**/*.DesktopClient/ModelManifest.xml
229+
**/*.Server/GeneratedArtifacts
230+
**/*.Server/ModelManifest.xml
231+
_Pvt_Extensions
232+
233+
# Paket dependency manager
234+
.paket/paket.exe
235+
236+
# FAKE - F# Make
237+
.fake/
238+
*.ncrunchproject
239+
*.ncrunchsolution
240+
241+
# SSDT
242+
*.jfm
243+
244+
# web client-side content
245+
**/wwwroot/dist/
246+
247+
# Visual Studio Code
248+
.vscode
249+
250+
/etc
251+
.liveness
252+
.idea/
253+
.pre-commit-config.yaml
254+
.DS_Store

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@vojtechmares

DemoApi.sln

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApi", "src\DemoApi\DemoApi.csproj", "{07CAAD13-1E96-4D90-9382-8F0036492158}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApi.Tests", "tests\DemoApi.Tests\DemoApi.Tests.csproj", "{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Debug|x64 = Debug|x64
18+
Debug|x86 = Debug|x86
19+
Release|Any CPU = Release|Any CPU
20+
Release|x64 = Release|x64
21+
Release|x86 = Release|x86
22+
EndGlobalSection
23+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
24+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Debug|x64.ActiveCfg = Debug|Any CPU
27+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Debug|x64.Build.0 = Debug|Any CPU
28+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Debug|x86.ActiveCfg = Debug|Any CPU
29+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Debug|x86.Build.0 = Debug|Any CPU
30+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Release|x64.ActiveCfg = Release|Any CPU
33+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Release|x64.Build.0 = Release|Any CPU
34+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Release|x86.ActiveCfg = Release|Any CPU
35+
{07CAAD13-1E96-4D90-9382-8F0036492158}.Release|x86.Build.0 = Release|Any CPU
36+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
38+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Debug|x64.ActiveCfg = Debug|Any CPU
39+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Debug|x64.Build.0 = Debug|Any CPU
40+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Debug|x86.ActiveCfg = Debug|Any CPU
41+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Debug|x86.Build.0 = Debug|Any CPU
42+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
43+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Release|x64.ActiveCfg = Release|Any CPU
45+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Release|x64.Build.0 = Release|Any CPU
46+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Release|x86.ActiveCfg = Release|Any CPU
47+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1}.Release|x86.Build.0 = Release|Any CPU
48+
EndGlobalSection
49+
GlobalSection(SolutionProperties) = preSolution
50+
HideSolutionNode = FALSE
51+
EndGlobalSection
52+
GlobalSection(NestedProjects) = preSolution
53+
{07CAAD13-1E96-4D90-9382-8F0036492158} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
54+
{D0C4B401-B755-4FAE-8035-57C1EE4E89D1} = {0AB3BF05-4346-4AA6-1389-037BE0695223}
55+
EndGlobalSection
56+
EndGlobal

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# dotnet-api-demo
2+
3+
A simple .NET project demo with REST API, GitHub, and GitHub Actions.
4+
5+
## Tests
6+
7+
Tests are using xunit.
8+
9+
```bash
10+
dotnet test
11+
```
12+
13+
## Dependencies
14+
15+
```bash
16+
dotnet restore
17+
```
18+
19+
## Build
20+
21+
```bash
22+
dotnet build
23+
```
24+
25+
## Docker build
26+
27+
```bash
28+
docker build -t dotnet-demo-api .
29+
```

src/DemoApi/DemoApi.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net9.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
11+
</ItemGroup>
12+
13+
</Project>

src/DemoApi/DemoApi.http

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@DemoApi_HostAddress = http://localhost:5183
2+
3+
GET {{DemoApi_HostAddress}}/weatherforecast/
4+
Accept: application/json
5+
6+
###

0 commit comments

Comments
 (0)