Skip to content

ApiService is a modern .NET 9 Web API that integrates OpenAPI, Swagger UI, and ReDoc for interactive API documentation. It includes custom service defaults and Scalar integration for efficient data handling, ensuring scalability, flexibility, and ease of use.

Notifications You must be signed in to change notification settings

MrEshboboyev/aspire-customization

Repository files navigation

🚀 ApiService – Modern .NET 9 Web API

.NET 9 Web API OpenAPI Swagger ReDoc

🎯 Overview

ApiService is a modern .NET 9 Web API that leverages OpenAPI for documentation and Swagger UI for interactive API exploration. It provides custom service defaults and integrates with Scalar for efficient data handling. Designed for scalability, maintainability, and ease of use, this project is an excellent starting point for building robust web APIs.

Why Use ApiService?

  • 🚀 Rapid API Development – Pre-configured for fast API setup.
  • 📖 Comprehensive Documentation – Automatically generates OpenAPI specs.
  • Interactive API Testing – Integrated Swagger UI & ReDoc.
  • 🛠 Scalable & Customizable – Supports custom service defaults for flexibility.

🌟 Features

Built with .NET 9 – Leverages the latest ASP.NET Core innovations.
OpenAPI Documentation – Provides standardized API specs.
Swagger UI & ReDoc – Enables real-time API exploration & testing.
Scalar Integration – Ensures efficient data handling.
Custom Service Defaults – Allows customized configurations for services.


🏗️ Architecture & Project Structure

📌 src/ApiService – Main API project with controllers and configurations.
📌 src/ApiService/Services – Business logic and API services.
📌 src/ApiService/Endpoints – Defines RESTful API endpoints.


🚀 Getting Started

📌 Prerequisites

.NET 9 SDK

Step 1: Clone the Repository

git clone https://github.com/MrEshboboyev/aspire-customization.git
cd ApiService

Step 2: Install Dependencies

dotnet restore

Step 3: Build the Application

dotnet build

Step 4: Run the Application

dotnet run

🌍 API Documentation

Once the application is running, explore the API using:

🔹 Swagger UIhttp://localhost:/swagger
🔹 ReDochttp://localhost:/redoc

📝 Swagger UI provides an interactive API experience, allowing you to test endpoints directly.
🧐 ReDoc offers a beautifully structured API reference, making it easy to understand.


📡 API Endpoints

Method Endpoint Description
GET /api/status Returns API health status
GET /api/data Fetches sample data
POST /api/data Submits new data
PUT /api/data/{id} Updates existing data
DELETE /api/data/{id} Removes a record

🛠 Configuration

Customize API settings in appsettings.json:

{
  "ApiSettings": {
    "ServiceName": "ApiService",
    "Version": "v1",
    "EnableSwagger": true
  }
}

🧪 Testing

Unit Tests

Run tests to ensure API stability:

dotnet test

Manual API Testing

📌 Use Postman or Swagger UI to:
Check API health/api/status
Fetch data/api/data
Submit data/api/data (POST)


🎯 Why Use This Project?

Supercharged API Development – Reduces setup time & boosts productivity.
Well-Documented & Interactive – Easily explore endpoints with Swagger & ReDoc.
Scalable & Flexible – Supports custom service configurations.
Built for .NET 9 – Utilizes latest performance improvements.


📜 License

This project is licensed under the MIT License. See LICENSE for details.


📞 Contact

For feedback, contributions, or questions:
📧 Email: [email protected]
💻 GitHub: MrEshboboyev


🚀 Start building scalable APIs with ApiService! Clone the repo & get started today!

About

ApiService is a modern .NET 9 Web API that integrates OpenAPI, Swagger UI, and ReDoc for interactive API documentation. It includes custom service defaults and Scalar integration for efficient data handling, ensuring scalability, flexibility, and ease of use.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages