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

https://github.com/crisfeim/backend-sandbox-swift-rest

🏖️ Sandbox on how to build a lightweight dynamic minimal REST API server in Swift for learning purposes.
https://github.com/crisfeim/backend-sandbox-swift-rest

reinventing-the-wheel-for-learning-purposes server-side-swift

Last synced: 9 months ago
JSON representation

🏖️ Sandbox on how to build a lightweight dynamic minimal REST API server in Swift for learning purposes.

Awesome Lists containing this project

README

          

# Simple Swift REST-API Server

Exploration on how to build a lightweight dynamic minimal **REST API server** in Swift for learning purposes.

## Desired API

A simple but extensible API surface for declaring endpoints, inspired by declarative patterns.

```swift
let cd = CoreDataProvider()
let fs = FileSystemDataProvider()

let recipes = Endpoint(
path: "recipes",
dataProvider: fs,
auth: .bearAuth
)

let todos = Endpoint(
path: "todos",
dataProvider: cd
)

let users = Endpoint(path: "users", provider: fs)

Server(endpoits: [recipes, todos, users])
```