OpenHolidays API
December 11, 2025 ยท View on GitHub
The service behind the OpenHolidays API. Build with .NET 10.
Technology stack
- PostgreSQL 17+ as database
- ASP.NET as web framework
- Entity Framework Core as ORM layer
- Swagger UI for OpenAPI based documentation
Getting started
The following instructions show you how to set up a development environment on your computer.
Prerequisites
- Set up a local PosgreSQL 17 (or higher) instance.
- Clone or download the repository OpenHolidaysApi.Data.
- Clone or download this repository.
- Open the solution file
OpenHolidaysApi.slnxin Visual Studio 2026.
Configure the OpenHolidaysApi CLI
-
Switch to the project
OpenHolidaysApi.CLI. -
Make a copy of the the
appsettings.jsonfile and name itappsettings.Development.json. -
Exchange the content with the following JSON document and adjust the values to your needs. This configures the root folder for the csv data sources (the
srcfolder in your local OpenHolidaysApi.Data repository) and the database connection."Sources": { "RootFolderName": "c:\\openholidaysapi.data\\src" }, "Database": { "Server": "localhost", "Database": "OpenHolidaysApi", "Username": "postgres", "Password": "qwertz" }
Create and populate the database
- Build the
OpenHolidaysApi.CLIproject. - Run the
OpenHolidaysApi.CLIproject with parameterinitdb --import. This will create and populate the PostgreSQL database.
Configure the OpenHolidaysApi WebService
-
Switch to the
OpenHolidaysApi.WebService. -
Make a copy of the the
appsettings.jsonfile and name itappsettings.Development.json. -
Exchange the content with the following JSON document and adjust the values to your needs. This configures the database connection.
"Database": { "Server": "localhost", "Database": "OpenHolidaysApi", "Username": "postgres", "Password": "qwertz" }
Build and test the API
- Build the
OpenHolidaysApi.WebServiceproject. - Run the
OpenHolidaysApi.WebServiceproject and play with the Swagger UI.
Can I help?
Yes, that would be much appreciated. The best way to help is to post a response via the Issue Tracker and/or submit a Pull Request.