Skip to content

Commit e9842c9

Browse files
author
Derek Dowling
authored
Merge pull request #34 from bsdlp/merge_jshapi
merge jsh-api into go-json-spec-handler
2 parents eaea1e2 + 7f3d3f5 commit e9842c9

File tree

20 files changed

+315
-91
lines changed

20 files changed

+315
-91
lines changed

Godeps/Godeps.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ sending JSONAPI compatible responses.
9393
Not Implementing:
9494

9595
* These features aren't handled because they are beyond the scope of what
96-
this module is meant to achieve. See [jshapi](https://github.com/derekdowling/jsh-api)
96+
this module is meant to achieve. See [jshapi](https://github.com/derekdowling/go-json-spec-handler/tree/master/jsh-api)
9797
for a full-fledged API solution that solves many of these problems.
9898

9999
- Routing
@@ -126,10 +126,10 @@ user := &yourUser{}
126126
err := object.Unmarshal("users", user)
127127
```
128128

129-
### [JSH-API](https://github.com/derekdowling/jsh-api)
129+
### [JSH-API](https://github.com/derekdowling/go-json-spec-handler/tree/master/jsh-api)
130130

131131
If you're looking for a good place to start with a new API, I've since created
132-
[jshapi](https://github.com/derekdowling/jsh-api) which builds on top of [Goji 2](https://goji.io/)
132+
[jshapi](https://github.com/derekdowling/go-json-spec-handler/tree/master/jsh-api) which builds on top of [Goji 2](https://goji.io/)
133133
and `jsh` in order to handle the routing structure that JSON API requires as
134134
well as a number of other useful tools for testing and mocking APIs as you
135135
develop your own projects. JSHAPI is similar in spirit to this project as it

_vendor/github.com/derekdowling/jsh-api/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

_vendor/github.com/derekdowling/jsh-api/.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

_vendor/github.com/derekdowling/jsh-api/Godeps/Godeps.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

_vendor/github.com/derekdowling/jsh-api/Godeps/Readme

Lines changed: 0 additions & 5 deletions
This file was deleted.

client/client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"golang.org/x/net/context"
1010

1111
"github.com/derekdowling/go-json-spec-handler"
12-
"github.com/derekdowling/jsh-api"
12+
"github.com/derekdowling/go-json-spec-handler/jsh-api"
1313
. "github.com/smartystreets/goconvey/convey"
1414
)
1515

@@ -105,7 +105,7 @@ func TestResponseParsing(t *testing.T) {
105105
}
106106

107107
// not a great for this, would much rather have it in test_util, but it causes an
108-
// import cycle wit jsh-api
108+
// import cycle with jsh-api
109109
func testAPI() *jshapi.API {
110110

111111
resource := jshapi.NewMockResource("tests", 1, nil)

_vendor/github.com/derekdowling/jsh-api/LICENSE renamed to jsh-api/LICENSE

File renamed without changes.

_vendor/github.com/derekdowling/jsh-api/README.md renamed to jsh-api/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# JSH-API
22

3-
[![GoDoc](https://godoc.org/github.com/derekdowling/go-json-spec-handler?status.png)](https://godoc.org/github.com/derekdowling/jsh-api)
4-
[![Build Status](https://travis-ci.org/derekdowling/jsh-api.svg?branch=master)](https://travis-ci.org/derekdowling/jsh-api)
5-
[![Go Report Card](http://goreportcard.com/badge/manyminds/api2go)](http://goreportcard.com/report/derekdowling/jsh-api)
3+
[![GoDoc](https://godoc.org/github.com/derekdowling/go-json-spec-handler/jsh-api?status.png)](https://godoc.org/github.com/derekdowling/go-json-spec-handler/jsh-api)
64

75
A [JSON API](http://jsonapi.org) specification micro-service builder created on top of
86
[jsh](http://github.com/derekdowling/go-json-spec-handler), [Goji](http://goji.io), and [context](https://godoc.org/golang.org/x/net/context) to handle the nitty gritty but predictable (un)wrapping, validating, preparing, and logging necessary for any JSON API written in Go. The rest (storage, and business logic) is up to you.
@@ -12,7 +10,7 @@ A [JSON API](http://jsonapi.org) specification micro-service builder created on
1210
The easiest way to get started is like so:
1311

1412
```go
15-
import github.com/derekdowling/jsh-api
13+
import github.com/derekdowling/go-json-spec-handler/jsh-api
1614

1715
// implement jshapi/store.CRUD interface and add resource specific middleware via Goji
1816
userStorage := &UserStorage{}
@@ -31,7 +29,7 @@ http.ListenAndServe("localhost:8000", api)
3129
For a completely custom setup:
3230

3331
```go
34-
import github.com/derekdowling/jsh-api
32+
import github.com/derekdowling/go-json-spec-handler/jsh-api
3533

3634
// manually setup your API
3735
api := jshapi.New("<prefix>")
@@ -102,7 +100,7 @@ resource.Action("reset", resetAction)
102100

103101
## Working With Storage Interfaces
104102

105-
Below is a basic example of how one might implement parts of a [CRUD Storage](https://godoc.org/github.com/derekdowling/jsh-api/store#CRUD)
103+
Below is a basic example of how one might implement parts of a [CRUD Storage](https://godoc.org/github.com/derekdowling/go-json-spec-handler/tree/master/jsh-api/store#CRUD)
106104
interface for a basic user resource using [jsh](https://godoc.org/github.com/derekdowling/go-json-spec-handler)
107105
for Save and Update. This should give you a pretty good idea of how easy it is to
108106
implement the Storage driver with jsh.

_vendor/github.com/derekdowling/jsh-api/api.go renamed to jsh-api/api.go

File renamed without changes.

0 commit comments

Comments
 (0)