Sherpa
Sherpa is a Go library for creating a sherpa API.
This library makes it trivial to export Go functions as a sherap API with an http.Handler.
Your API will automatically be documented: cmd/sherpadoc reads your Go source, and exports function and type comments as API documentation.
See the documentation.
Examples
A public sherpa API: https://www.sherpadoc.org/#https://www.sherpadoc.org/example/
That web application is sherpaweb. It shows documentation for any sherpa API but also includes an API called Example for demo purposes.
Ding is a more elaborate web application built with this library.
About
Written by Mechiel Lukkien, mechiel@ueber.net.
Bug fixes, patches, comments are welcome.
MIT-licensed, see LICENSE.
cmd/sherpadoc/gopath.go originates from the Go project, see LICENSE-go for its BSD-style license.
todo
finish the type information. perhaps add more specific types (int64, int32, and unsigned variants, instead of just “int”).
better error messages in sherpadoc
handler: write tests
sherpadoc: write tests
client: write tests
sherpadoc: find out which go constructs people want to use that aren’t yet implemented by sherpadoc
when reading types from other packages (imported packages), we only look at GOPATH. vendor and modules are not taking into account, but we should.