Skip to content

Apodini/APIKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APIKit

APIKit Logo

Swift 5.2 License

APIKit is a Swift library to give you more flexibility when developing web APIs. In its current version APIKit is a POC for a framework that provides a declarative, composeable DSL which makes developing APIs against a communication protocol (CCP) natural interface a breeze. APIKit handles the mapping to concrete CCPs with no hassle.

Example

Below is an example of an API that manages Vehicles and Customers beloging to a car vendor.

struct CarVendorAPI: API {
    var content: APILogic {
        Version("v1") {
            CRUD<Car>()
            
            Group {
                ReadOne<Customer>()
                Update<Customer>()
            }.RESTGroup("customer")
            
            CRUD<Customer>()
        }
    }
}

Installation

Swift Package Manager

You can install APIKit via Swift Package Manager by adding the following line to your Package.swift:

import PackageDescription

let package = Package(
    [...]
    dependencies: [
        .Package(url: "https://github.com/Apodini/APIKit.git", majorVersion: XYZ)
    ]
)

Contributing

Contributions to this projects are welcome. Please make sure to read the contribution guidelines first.

License

APIKit is licensed under the MIT License. See LICENSE file for more information.

About

APIKit the declarative CCP independent API definition framework

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages