tree: 66d16c8b034c9571abce89af48f4b60b82aa20d5 [path history] [tgz]
  1. Sources/
  2. Tests/
  3. bookstore.json
  4. Makefile
  5. Package.swift
  6. README.md
vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/README.md

Bookstore Example

This directory contains an OpenAPI description of a simple bookstore API.

Use this example to try the gnostic-swift-generator plugin, which generates Swift code that implements an API client and server for an OpenAPI description.

Run make all to build and install gnostic and the Swift plugin. It will generate both client and server code. The API client and server code will be in the Sources/Bookstore package.

The Sources/Server directory contains additional code that completes the server. To build and run the server, do the following:

swift build
.build/debug/Server &

To test the service with the generated client, run swift build. Tests are in the Tests directory and use client code generated in Bookstore to verify the service.