Skip to content

A client generator for APIs described by Google's API Discovery Format.

License

Notifications You must be signed in to change notification settings

Mark-McCracken/google-api-swift-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift REST Client Generator for Google APIs

This project contains Swift code that generates a API clients from Discovery Documents produced by the Google API Discovery Service.

It is experimental work-in-progress, but provides a good start at calling many Google APIs from Swift. Our focus is on supporting calls from server-side and command-line Swift applications, but calls from any platform with Swift support should be possible.

Usage

API clients are be produced by running the generator with Discovery Documents downloaded from the Discovery Service. Running the following writes a client to standard output:

google-api-swift-generator <discovery-document-filename>

This can be redirected to a file for easier inspection:

google-api-swift-generator <discovery-document-filename> > client.swift

This project also includes an experimental CLI generator that generates command-line interfaces for APIs. These CLIs depend on the generated client libraries and are produced with the google-cli-swift-generator command. Running the following writes a CLI main.swift to standard output:

google-cli-swift-generator <discovery-document-filename>

The Examples directory contains several example clients including scripts for generating both client libraries and CLIs.

Contributing

We'd love to collaborate on this. See CONTRIBUTING.md for details.

Copyright

Copyright 2019, Google Inc.

License

Released under the Apache 2.0 license.

About

A client generator for APIs described by Google's API Discovery Format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 99.9%
  • Makefile 0.1%