Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 847 Bytes

File metadata and controls

22 lines (13 loc) · 847 Bytes

Command-line client

An example project using Swift OpenAPI Generator.

Disclaimer: This example is deliberately simplified and is intended for illustrative purposes only.

Overview

A command-line tool using Swift Argument Parser that shows using a generated client to make a request to the Greeting Service running on http://localhost:8080.

The tool uses the URLSession API to perform the HTTP call, wrapped in the Swift OpenAPI URLSession Transport.

The server can be started by running any of the Hello World server examples locally.

Usage

Build and run the client CLI using:

% swift run CommandLineClient greet --name CLI
Hello, CLI!