A simple server implementation using FastAPI.
This project provides an example server built with FastAPI for demonstrating SDK generation using Speakeasy. The server provides a set of API endpoints for managing travel destinations.
- Python 3.7+
- UV
First, ensure you have uv installed. If you don't have it, install it with:
curl -LsSf https://astral.sh/uv/install.sh | sh
Next, clone the repository:
git clone https://github.com/ritza-co/speakeasy-mocking-example-server.git
cd fastapi-mock-server
-
Start the server:
uv run main.py
-
Access the API documentation at:
http://localhost:8000/docs
GET /destinations
Returns a list of all available destinations.
GET /destinations/{id}
Returns details for a specific destination.
POST /destinations
Add a new destination to the system.
PUT /destinations/{id}
Update an existing destination.
DELETE /destinations/{id}
Remove a destination from the system.
{
"id": 1,
"name": "Paris",
"country": "France",
"description": "The city of love",
"rating": 4.5
}