Skip to content
/ Code4Fun.Demo.Api Public template

Example of how you can set up an web api with well defined arcitecture, unit testing and customized open api documentation

License

Notifications You must be signed in to change notification settings

skarnes20/Code4Fun.Demo.Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quality Gate Status

Code4Fun.Demo.Api

Example of how you can set up an web api with well defined arcitecture, unit testing and customized open api documentation

Example of customized Open Api

Based on Swachbuckle so you ned to add

Install-Package Swashbuckle.AspNetCore -Version 6.9.0

Demonstrate

  • Custom url (api/docs)
  • Customized gui
  • Enrich auto documentet controllers

How it looks

Image of customized open api

See the a OpenApiInstaller for example code

Use InMemory database to unit test your data access layer

  • Look at TestBaseDb to see how you can setup a testbase using InMemoryDb
  • Look at WeatherRepositoryTest to see how you easely can unit test your repository

Use of Installers to have clean layers

  • I keep my plumming code in the catalouge Infrastructure.
  • I use Installers to have a clean setup and make sure that each layer keep hold of it's own dependencyes
  • Example DataAccessInstaller

About

Example of how you can set up an web api with well defined arcitecture, unit testing and customized open api documentation

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published