Commit Graph

4 Commits

Author SHA1 Message Date
Elf M. Sternberg a27ae64d92 Adding all features provided by swagger generate and dep init.
At thing point, we've configued the swagger file and run 'dep init', which
goes out and finds all the libraries in use by the swagger runtime, downloads
them, and incorporates them into the build process.

We can run `go build ./cmd/timeofday-server` and the server will show
up in our project's base directory.  We can run the server:
`./timeofday-server --port=8020`, and then ping the endpoints:

curl http://localhost:8020
{"code":404,"message":"path / was not found"}

curl http://localhost:8020/timeofday/v1/
"operation .ClockGet has not yet been implemented"

Note that one returns an object, and the other returns a string.
Both are valid JSON objects.
2018-03-28 12:23:24 -07:00
Elf M. Sternberg 5ddc7c6a79 ADD The API that the server will support. 2018-03-28 12:20:20 -07:00
Elf M. Sternberg 7d5d030960 GENERATE swagger.yml file.
$ swagger init spec --format=yaml --title=timeofday --description="Return the time of day. Timezone optional."  --contact.name="Elf Sternberg" \
  --contact.url="https://github.com/elfsternberg/go-timeofday" --contact.email="elf.sternberg@gmail.com" --license.name="apache-2.0"
2018-03-28 11:33:41 -07:00
Elf M. Sternberg 51296cb94c Initial commit 2018-03-28 11:33:21 -07:00