Giter VIP home page Giter VIP logo

swift-openapi-runtime's Introduction

Swift OpenAPI Generator Runtime

This library provides common abstractions and helper functions used by the client and server code generated by Swift OpenAPI Generator.

Overview

It contains:

Many of the HTTP currency types used are defined in the Swift HTTP Types library.

Tip: Check out the example projects focused on middlewares.

Usage

Add the package dependency in your Package.swift:

.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.0.0"),

Next, in your target, add OpenAPIRuntime to your dependencies:

.target(name: "MyTarget", dependencies: [
    .product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
]),

The next step depends on your use case.

Using Swift OpenAPI Generator for code generation

The generated code depends on types from this library. Check out the adoption guides in the Swift OpenAPI Generator documentation to see how the packages fit together.

Implementing transports and middlewares

Swift OpenAPI Generator generates client and server code that is designed to be used with pluggable transports and middlewares.

Implement a new transport or middleware by providing a type that adopts one of the protocols from the runtime library:

You can also publish your transport or middleware as a Swift package to allow others to use it with their generated code.

Documentation

To learn more, check out the full documentation.

swift-openapi-runtime's People

Contributors

czechboy0 avatar simonjbeaumont avatar paraipan9 avatar bfrearson avatar mahdibm avatar sikevux avatar andrewse02 avatar arthurcro avatar larspetershh avatar rnro avatar rboyce avatar tib avatar

Forkers

alephao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.