Skip to content

Commit

Permalink
Merge pull request #5 from shimastripe/fix/change-package-name2
Browse files Browse the repository at this point in the history
Change package name and fix generation-test
  • Loading branch information
shimastripe committed Nov 13, 2021
2 parents 7f8449b + 156b51b commit 8f8359d
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ _testmain.go
bindata.go

/_example/_example
/_example/go.mod
/_example/go.sum
10 changes: 5 additions & 5 deletions _example/docs/company.apib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Create a new company
+ Request company (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ name: NAME (string)
Expand All @@ -27,7 +27,7 @@ Returns a company list.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (array, fixed)
Expand All @@ -49,7 +49,7 @@ Returns a company.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (company, fixed)
Expand All @@ -61,7 +61,7 @@ Update a company.
+ Request company (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ name: NAME (string)
Expand All @@ -78,7 +78,7 @@ Delete a company.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 204

Expand Down
10 changes: 5 additions & 5 deletions _example/docs/email.apib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Create a new email
+ Request email (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ address: ADDRESS (string)
Expand All @@ -27,7 +27,7 @@ Returns an email list.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (array, fixed)
Expand All @@ -49,7 +49,7 @@ Returns an email.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (email, fixed)
Expand All @@ -61,7 +61,7 @@ Update an email.
+ Request email (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ address: ADDRESS (string)
Expand All @@ -78,7 +78,7 @@ Delete an email.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 204

Expand Down
10 changes: 5 additions & 5 deletions _example/docs/job.apib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Create a new job
+ Request job (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ user_id: 1 (number)
Expand All @@ -28,7 +28,7 @@ Returns a job list.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (array, fixed)
Expand All @@ -50,7 +50,7 @@ Returns a job.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (job, fixed)
Expand All @@ -62,7 +62,7 @@ Update a job.
+ Request job (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ user_id: 1 (number)
Expand All @@ -80,7 +80,7 @@ Delete a job.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 204

Expand Down
10 changes: 5 additions & 5 deletions _example/docs/profile.apib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Create a new profile
+ Request profile (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ user_id: 1 (number)
Expand All @@ -28,7 +28,7 @@ Returns a profile list.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (array, fixed)
Expand All @@ -50,7 +50,7 @@ Returns a profile.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (profile, fixed)
Expand All @@ -62,7 +62,7 @@ Update a profile.
+ Request profile (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ user_id: 1 (number)
Expand All @@ -80,7 +80,7 @@ Delete a profile.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 204

Expand Down
10 changes: 5 additions & 5 deletions _example/docs/user.apib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Create a new user
+ Request user (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ name: NAME (string)
Expand All @@ -28,7 +28,7 @@ Returns an user list.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (array, fixed)
Expand All @@ -50,7 +50,7 @@ Returns an user.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (user, fixed)
Expand All @@ -62,7 +62,7 @@ Update an user.
+ Request user (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ name: NAME (string)
Expand All @@ -80,7 +80,7 @@ Delete an user.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 204

Expand Down
10 changes: 5 additions & 5 deletions apig/testdata/docs/user.apib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Create a new user
+ Request user (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ name: NAME (string)
Expand All @@ -25,7 +25,7 @@ Returns an user list.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (array, fixed)
Expand All @@ -47,7 +47,7 @@ Returns an user.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 200 (application/json; charset=utf-8)
+ Attributes (user, fixed)
Expand All @@ -59,7 +59,7 @@ Update an user.
+ Request user (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json
+ Attributes

+ name: NAME (string)
Expand All @@ -74,7 +74,7 @@ Delete an user.
+ Request (application/json; charset=utf-8)
+ Headers

Accept: application/vnd.wantedly+json
Accept: application/vnd.shimastripe+json

+ Response 204

Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ require (
github.com/mattn/go-isatty v0.0.0-20151211000621-56b76bdf51f7 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.17.0 // indirect
golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect
)
3 changes: 2 additions & 1 deletion script/generation_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ if [[ ! $(git status . | grep 'nothing to commit') ]]; then
fi

echo "===> Building API server..."
go get ./...
go mod init
go mod tidy
go build

if [[ $? -gt 0 ]]; then
Expand Down

0 comments on commit 8f8359d

Please sign in to comment.