Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
/ personapi Public archive

An example ASP.NET Core Web Api implementing Swashbuckle/Swagger, MOQ, repository pattern, Serilog, and versioning.

Notifications You must be signed in to change notification settings

osu-cass/personapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMPORTANT: This repo is no longer under development and has been archived.

PersonAPI

An example ASP.NET Core Web Api implementing:

  • Swashbuckle/Swagger/OpenAPI
  • MOQ/unit testing
  • Repository pattern
  • Serilog
  • Strongly-typed configurations
  • Versioning

This API demonstrates basic HTTP concepts by applying them to a group of "Person" objects, which have traits such as a Name, an ID, and whether or not the Person likes chocolate. Using the API, one can POST (create) a new person, PUT (update) a person, GET (read) persons, and DELETE persons.

Getting Started

Clone this repo and open it in Visual Studio. Launch using IIS Express. To access the generated documentation, navigate to https://localhost:[####]/swagger. Alternatively, to access a static copy of the documentation, go to https://mirrorkeydev.github.io/personapi-docs/.

Branches

The master branch contains the "workbook" version of the API, with unfinished tasks for developers to try their hand at. The solutions branch supplements the solutions to unfinished tasks, and is a fully functional example API.

Workbook Unfinished Task List

  • Implement GetPersonsByFilter() in V1.PersonController so that it passes its three unit tests: GetPersonByFilterTestNoResults(), GetPersonByFilterTestValid(), and GetPersonByFilterTestNoFilter().

About

An example ASP.NET Core Web Api implementing Swashbuckle/Swagger, MOQ, repository pattern, Serilog, and versioning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages