rest

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2018 License: BSD-3-Clause Imports: 23 Imported by: 0

README

RESTful Web Service

This is a sample of a "legacy" RESTful web service that implements the Goodbye service. The IdP service is required to be running and accessible.

Running

This services needs to know the address of the IdP service as an environment variable. The value should be in the form of: host:port where host is optional. If host is provided it must be a hostname or (v4 or v6) IP address.

export IDP_SERVICE_ADDR=":9601"

See the parent README.MD for instructions to run the example services together.

Endpoints

This example implements the following API:

#%RAML 0.8
title: Goodbye Service
version: 1

/goodbye:
  get:
    queryParameters:
      name:
        description: The person departing (defaults to user name)
    responses:
      200:
        body:
          application/json:
            schema:
              $schema: http://json-schema.org/draft-04/schema#
              type: object
              properties:
                goodbye:
                  type: string
              required:
                - goodbye
            example:
              goodbye: "Boss"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL