Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexandra-valkova/travelapi

ASP.NET Core 8 Minimal API that processes boarding cards ๐ŸŽซ Written with Clean Architecture, MediatR, FluentValidation. Includes unit tests (xUnit) ๐Ÿงช
https://github.com/alexandra-valkova/travelapi

asp-net asp-net-core asp-net-core-8 asp-net-core-web-api carter clean-architecture csharp dotnet dotnet-core dotnet8 fluent-assertions fluent-validation mediatr minimal-api swagger-ui swashbuckle webapi xunit

Last synced: about 1 month ago
JSON representation

ASP.NET Core 8 Minimal API that processes boarding cards ๐ŸŽซ Written with Clean Architecture, MediatR, FluentValidation. Includes unit tests (xUnit) ๐Ÿงช

Awesome Lists containing this project

README

        

๏ปฟ# Travel API
ASP.NET 8 Web API that puts boarding cards in order ๐ŸŽซ and returns a summary of the given journey ๐Ÿงณ

## Structure
- _**Domain**_ - entities, enums, interfaces and exceptions;
- _**Application**_ - use cases with **MediatR**, validation with **FluentValidation** and services;
- _**API**_ - Minimal API with **Swagger UI**, **Swashbuckle** and **Carter**;
- _**Tests**_ - Unit tests with **xUnit** and **FluentAssertions**;

## Task
You are given a stack of boarding cards for various transportations that will take you from point A to point B via several stops on the way. All of the boarding cards are out of order and you don't know where your journey starts, nor where it ends. Each boarding card contains information about seat assignment, and means of transportation (such as flight number, bus number etc).

Write an API that lets you sort this kind of list and present back a description of how to complete your journey.

For instance the API should be able to take an unordered set of boarding cards, provided in a format defined by you, and produce this list:

- Take train 78A from Madrid to Barcelona. Sit in seat 45B.
- Take the airport bus from Barcelona to Gerona Airport. No seat assignment.
- From Gerona Airport, take flight SK455 to Stockholm. Gate 45B, seat 3A. Baggage drop at ticket counter 344.
- From Stockholm, take flight SK22 to New York JFK. Gate 22, seat 7B. Baggage will be automatically transferred from your last leg.
- You have arrived at your final destination.

The list should be defined in a format that's compatible with the input format.

## Swagger UI
![TravelAPI Swagger UI](swagger-ui.png)