Minimal APIs – Creating REST Services
Since .NET 6, minimal APIs are the new way to create REST APIs. With later .NET versions, more and more enhancements have been made available, which makes them the preferred way to create REST services with .NET.
In this chapter, you’ll learn how to create a data representation of the game with model types, use these types in a service to implement the game functionality, create a minimal API project to create games, update games by setting game moves, and return information about games.
You’ll implement functionality to offer an OpenAPI description for developers accessing the service to get information about the service, and an easy way to create a client application.
In this chapter, you’ll be exploring these topics:
- Creating models for the game
- Implementing an in-memory game repository
- Implementing the REST service of the game using minimal APIs
- Using OpenAPI to describe the service ...