You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-06-15 00:15:15 +02:00
fix api route for app page for docs
This commit is contained in:
@ -263,11 +263,12 @@ If you run into errors running `swag init` try the following:
|
||||
Try to install the packages to your $GOPATH.
|
||||
|
||||
```bash
|
||||
GO111MODULE=off go get github.com/leodido/go-urn
|
||||
GO111MODULE=off go get github.com/lib/pq/oid
|
||||
GO111MODULE=off go get github.com/lib/pq/scram
|
||||
GO111MODULE=off go get github.com/tinylib/msgp/msgp
|
||||
GO111MODULE=off go get gopkg.in/DataDog/dd-trace-go.v1/ddtrace
|
||||
GO111MODULE=off go get -u github.com/leodido/go-urn
|
||||
GO111MODULE=off go get -u github.com/lib/pq/oid
|
||||
GO111MODULE=off go get -u github.com/lib/pq/scram
|
||||
GO111MODULE=off go get -u github.com/tinylib/msgp/msgp
|
||||
GO111MODULE=off go get -u gopkg.in/DataDog/dd-trace-go.v1/ddtrace
|
||||
GO111MODULE=off go get -u golang.org/x/xerrors
|
||||
```
|
||||
|
||||
#### error writing go.mod
|
||||
|
@ -1,27 +1,24 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2019-06-27 04:56:45.692511 -0800 AKDT m=+325.727343639
|
||||
// 2019-08-05 19:25:44.265503 -0800 AKDT m=+407.181284601
|
||||
|
||||
package docs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/alecthomas/template"
|
||||
"github.com/swaggo/swag"
|
||||
)
|
||||
|
||||
var doc = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"description": "{{.Description}}",
|
||||
"title": "SaaS Example API",
|
||||
"termsOfService": "http://example.com/terms",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "http://example.com/support",
|
||||
"email": "support@geeksinthewoods.com"
|
||||
},
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
@ -67,21 +64,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -126,21 +123,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,21 +179,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,7 +245,7 @@ var doc = `{
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Included Archived, example: false",
|
||||
"name": "included-archived",
|
||||
"name": "include-archived",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@ -266,21 +263,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -328,28 +325,28 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -389,21 +386,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -445,21 +442,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -504,21 +501,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -555,21 +552,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -612,14 +609,14 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -671,7 +668,7 @@ var doc = `{
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Included Archived, example: false",
|
||||
"name": "included-archived",
|
||||
"name": "include-archived",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@ -689,21 +686,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -749,28 +746,28 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -807,21 +804,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -861,21 +858,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -917,27 +914,27 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user_accounts/{id}": {
|
||||
"/user_accounts/{user_id}/{account_id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@ -976,21 +973,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1042,7 +1039,7 @@ var doc = `{
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Included Archived, example: false",
|
||||
"name": "included-archived",
|
||||
"name": "include-archived",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@ -1060,14 +1057,14 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1113,21 +1110,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1167,21 +1164,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1223,21 +1220,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1279,21 +1276,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1332,21 +1329,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1391,21 +1388,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1442,21 +1439,21 @@ var doc = `{
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1571,15 +1568,6 @@ var doc = `{
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"pending",
|
||||
"disabled"
|
||||
],
|
||||
"example": "disabled"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string",
|
||||
"example": "America/Anchorage"
|
||||
@ -1616,14 +1604,6 @@ var doc = `{
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Rocket Launch"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"example": "active"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1678,14 +1658,6 @@ var doc = `{
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Rocket Launch to Moon"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"example": "disabled"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1764,17 +1736,23 @@ var doc = `{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"name",
|
||||
"password"
|
||||
"first_name",
|
||||
"last_name",
|
||||
"password",
|
||||
"password_confirm"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "{RANDOM_EMAIL}"
|
||||
},
|
||||
"name": {
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
"example": "Gabi"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "May"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
@ -1792,6 +1770,9 @@ var doc = `{
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
@ -1802,17 +1783,23 @@ var doc = `{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"name",
|
||||
"password"
|
||||
"first_name",
|
||||
"last_name",
|
||||
"password",
|
||||
"password_confirm"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "gabi@geeksinthewoods.com"
|
||||
},
|
||||
"name": {
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
"example": "Gabi"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "May"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
@ -1843,13 +1830,24 @@ var doc = `{
|
||||
"type": "string",
|
||||
"example": "gabi@geeksinthewoods.com"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi"
|
||||
},
|
||||
"gravatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "May"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
"example": "Gabi"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string",
|
||||
@ -1865,7 +1863,8 @@ var doc = `{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"password"
|
||||
"password",
|
||||
"password_confirm"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -1892,11 +1891,15 @@ var doc = `{
|
||||
"type": "string",
|
||||
"example": "gabi.may@geeksinthewoods.com"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May Not"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"name": {
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May Not"
|
||||
},
|
||||
@ -1948,15 +1951,6 @@ var doc = `{
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"invited",
|
||||
"disabled"
|
||||
],
|
||||
"example": "active"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
@ -1981,10 +1975,6 @@ var doc = `{
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.TimeResponse"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@ -2036,21 +2026,32 @@ var doc = `{
|
||||
"user"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"invited",
|
||||
"disabled"
|
||||
],
|
||||
"example": "disabled"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.EnumMultiResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/web.EnumOption"
|
||||
}
|
||||
},
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": [
|
||||
"active_etc"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.EnumOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -2087,31 +2088,6 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/web.FieldError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.FieldError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.TimeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -2131,6 +2107,10 @@ var doc = `{
|
||||
"type": "string",
|
||||
"example": "Tue Jun 25"
|
||||
},
|
||||
"local_time": {
|
||||
"type": "string",
|
||||
"example": "3:00AM"
|
||||
},
|
||||
"now_rel_time": {
|
||||
"type": "string",
|
||||
"example": "15 hours from now"
|
||||
@ -2160,6 +2140,49 @@ var doc = `{
|
||||
"example": "2019-06-25T11:00:53.284Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weberror.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"details": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/weberror.FieldError"
|
||||
}
|
||||
},
|
||||
"stack_trace": {
|
||||
"type": "string"
|
||||
},
|
||||
"status_code": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weberror.FieldError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"display": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
@ -2182,17 +2205,23 @@ type swaggerInfo struct {
|
||||
Version string
|
||||
Host string
|
||||
BasePath string
|
||||
Schemes []string
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo swaggerInfo
|
||||
var SwaggerInfo = swaggerInfo{Schemes: []string{}}
|
||||
|
||||
type s struct{}
|
||||
|
||||
func (s *s) ReadDoc() string {
|
||||
t, err := template.New("swagger_info").Parse(doc)
|
||||
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
||||
"marshal": func(v interface{}) string {
|
||||
a, _ := json.Marshal(v)
|
||||
return string(a)
|
||||
},
|
||||
}).Parse(doc)
|
||||
if err != nil {
|
||||
return doc
|
||||
}
|
||||
|
@ -1,14 +1,9 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is a sample server celler server.",
|
||||
"description": "{{.Description}}",
|
||||
"title": "SaaS Example API",
|
||||
"termsOfService": "http://example.com/terms",
|
||||
"contact": {
|
||||
"name": "API Support",
|
||||
"url": "http://example.com/support",
|
||||
"email": "support@geeksinthewoods.com"
|
||||
},
|
||||
"contact": {},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
@ -54,21 +49,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -113,21 +108,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -169,21 +164,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -235,7 +230,7 @@
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Included Archived, example: false",
|
||||
"name": "included-archived",
|
||||
"name": "include-archived",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@ -253,21 +248,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -315,28 +310,28 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -376,21 +371,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -432,21 +427,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -491,21 +486,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -542,21 +537,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -599,14 +594,14 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -658,7 +653,7 @@
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Included Archived, example: false",
|
||||
"name": "included-archived",
|
||||
"name": "include-archived",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@ -676,21 +671,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -736,28 +731,28 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -794,21 +789,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -848,21 +843,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -904,27 +899,27 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/user_accounts/{id}": {
|
||||
"/user_accounts/{user_id}/{account_id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
@ -963,21 +958,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1029,7 +1024,7 @@
|
||||
{
|
||||
"type": "boolean",
|
||||
"description": "Included Archived, example: false",
|
||||
"name": "included-archived",
|
||||
"name": "include-archived",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@ -1047,14 +1042,14 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1100,21 +1095,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1154,21 +1149,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1210,21 +1205,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1266,21 +1261,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1319,21 +1314,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1378,21 +1373,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1429,21 +1424,21 @@
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.ErrorResponse"
|
||||
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1558,15 +1553,6 @@
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"pending",
|
||||
"disabled"
|
||||
],
|
||||
"example": "disabled"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string",
|
||||
"example": "America/Anchorage"
|
||||
@ -1603,14 +1589,6 @@
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Rocket Launch"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"example": "active"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1665,14 +1643,6 @@
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Rocket Launch to Moon"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"disabled"
|
||||
],
|
||||
"example": "disabled"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1751,17 +1721,23 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"name",
|
||||
"password"
|
||||
"first_name",
|
||||
"last_name",
|
||||
"password",
|
||||
"password_confirm"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "{RANDOM_EMAIL}"
|
||||
},
|
||||
"name": {
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
"example": "Gabi"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "May"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
@ -1779,6 +1755,9 @@
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"force": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
@ -1789,17 +1768,23 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"name",
|
||||
"password"
|
||||
"first_name",
|
||||
"last_name",
|
||||
"password",
|
||||
"password_confirm"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "gabi@geeksinthewoods.com"
|
||||
},
|
||||
"name": {
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
"example": "Gabi"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "May"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
@ -1830,13 +1815,24 @@
|
||||
"type": "string",
|
||||
"example": "gabi@geeksinthewoods.com"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi"
|
||||
},
|
||||
"gravatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "May"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May"
|
||||
"example": "Gabi"
|
||||
},
|
||||
"timezone": {
|
||||
"type": "string",
|
||||
@ -1852,7 +1848,8 @@
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"password"
|
||||
"password",
|
||||
"password_confirm"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -1879,11 +1876,15 @@
|
||||
"type": "string",
|
||||
"example": "gabi.may@geeksinthewoods.com"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May Not"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"name": {
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"example": "Gabi May Not"
|
||||
},
|
||||
@ -1935,15 +1936,6 @@
|
||||
"admin"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"invited",
|
||||
"disabled"
|
||||
],
|
||||
"example": "active"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
@ -1968,10 +1960,6 @@
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/web.TimeResponse"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@ -2023,21 +2011,32 @@
|
||||
"user"
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"active",
|
||||
"invited",
|
||||
"disabled"
|
||||
],
|
||||
"example": "disabled"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.EnumMultiResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"options": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/web.EnumOption"
|
||||
}
|
||||
},
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": [
|
||||
"active_etc"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.EnumOption": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -2074,31 +2073,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/web.FieldError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.FieldError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"web.TimeResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -2118,6 +2092,10 @@
|
||||
"type": "string",
|
||||
"example": "Tue Jun 25"
|
||||
},
|
||||
"local_time": {
|
||||
"type": "string",
|
||||
"example": "3:00AM"
|
||||
},
|
||||
"now_rel_time": {
|
||||
"type": "string",
|
||||
"example": "15 hours from now"
|
||||
@ -2147,6 +2125,49 @@
|
||||
"example": "2019-06-25T11:00:53.284Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weberror.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"details": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/weberror.FieldError"
|
||||
}
|
||||
},
|
||||
"stack_trace": {
|
||||
"type": "string"
|
||||
},
|
||||
"status_code": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"weberror.FieldError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"display": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"field": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
@ -77,13 +77,6 @@ definitions:
|
||||
signup_user_id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
status:
|
||||
enum:
|
||||
- active
|
||||
- pending
|
||||
- disabled
|
||||
example: disabled
|
||||
type: string
|
||||
timezone:
|
||||
example: America/Anchorage
|
||||
type: string
|
||||
@ -109,12 +102,6 @@ definitions:
|
||||
name:
|
||||
example: Rocket Launch
|
||||
type: string
|
||||
status:
|
||||
enum:
|
||||
- active
|
||||
- disabled
|
||||
example: active
|
||||
type: string
|
||||
required:
|
||||
- account_id
|
||||
- name
|
||||
@ -155,12 +142,6 @@ definitions:
|
||||
name:
|
||||
example: Rocket Launch to Moon
|
||||
type: string
|
||||
status:
|
||||
enum:
|
||||
- active
|
||||
- disabled
|
||||
example: disabled
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
@ -221,8 +202,11 @@ definitions:
|
||||
email:
|
||||
example: '{RANDOM_EMAIL}'
|
||||
type: string
|
||||
name:
|
||||
example: Gabi May
|
||||
first_name:
|
||||
example: Gabi
|
||||
type: string
|
||||
last_name:
|
||||
example: May
|
||||
type: string
|
||||
password:
|
||||
example: SecretString
|
||||
@ -232,11 +216,15 @@ definitions:
|
||||
type: string
|
||||
required:
|
||||
- email
|
||||
- name
|
||||
- first_name
|
||||
- last_name
|
||||
- password
|
||||
- password_confirm
|
||||
type: object
|
||||
user.UserArchiveRequest:
|
||||
properties:
|
||||
force:
|
||||
type: boolean
|
||||
id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
@ -248,8 +236,11 @@ definitions:
|
||||
email:
|
||||
example: gabi@geeksinthewoods.com
|
||||
type: string
|
||||
name:
|
||||
example: Gabi May
|
||||
first_name:
|
||||
example: Gabi
|
||||
type: string
|
||||
last_name:
|
||||
example: May
|
||||
type: string
|
||||
password:
|
||||
example: SecretString
|
||||
@ -262,8 +253,10 @@ definitions:
|
||||
type: string
|
||||
required:
|
||||
- email
|
||||
- name
|
||||
- first_name
|
||||
- last_name
|
||||
- password
|
||||
- password_confirm
|
||||
type: object
|
||||
user.UserResponse:
|
||||
properties:
|
||||
@ -276,11 +269,19 @@ definitions:
|
||||
email:
|
||||
example: gabi@geeksinthewoods.com
|
||||
type: string
|
||||
first_name:
|
||||
example: Gabi
|
||||
type: string
|
||||
gravatar:
|
||||
type: string
|
||||
id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
last_name:
|
||||
example: May
|
||||
type: string
|
||||
name:
|
||||
example: Gabi May
|
||||
example: Gabi
|
||||
type: string
|
||||
timezone:
|
||||
example: America/Anchorage
|
||||
@ -303,16 +304,20 @@ definitions:
|
||||
required:
|
||||
- id
|
||||
- password
|
||||
- password_confirm
|
||||
type: object
|
||||
user.UserUpdateRequest:
|
||||
properties:
|
||||
email:
|
||||
example: gabi.may@geeksinthewoods.com
|
||||
type: string
|
||||
first_name:
|
||||
example: Gabi May Not
|
||||
type: string
|
||||
id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
name:
|
||||
last_name:
|
||||
example: Gabi May Not
|
||||
type: string
|
||||
timezone:
|
||||
@ -347,13 +352,6 @@ definitions:
|
||||
- user
|
||||
type: string
|
||||
type: array
|
||||
status:
|
||||
enum:
|
||||
- active
|
||||
- invited
|
||||
- disabled
|
||||
example: active
|
||||
type: string
|
||||
user_id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
@ -373,9 +371,6 @@ definitions:
|
||||
created_at:
|
||||
$ref: '#/definitions/web.TimeResponse'
|
||||
type: object
|
||||
id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
roles:
|
||||
example:
|
||||
- admin
|
||||
@ -411,13 +406,6 @@ definitions:
|
||||
- user
|
||||
type: string
|
||||
type: array
|
||||
status:
|
||||
enum:
|
||||
- active
|
||||
- invited
|
||||
- disabled
|
||||
example: disabled
|
||||
type: string
|
||||
user_id:
|
||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||
type: string
|
||||
@ -425,6 +413,19 @@ definitions:
|
||||
- account_id
|
||||
- user_id
|
||||
type: object
|
||||
web.EnumMultiResponse:
|
||||
properties:
|
||||
options:
|
||||
items:
|
||||
$ref: '#/definitions/web.EnumOption'
|
||||
type: array
|
||||
values:
|
||||
example:
|
||||
- active_etc
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
web.EnumOption:
|
||||
properties:
|
||||
selected:
|
||||
@ -450,22 +451,6 @@ definitions:
|
||||
example: active_etc
|
||||
type: string
|
||||
type: object
|
||||
web.ErrorResponse:
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
fields:
|
||||
items:
|
||||
$ref: '#/definitions/web.FieldError'
|
||||
type: array
|
||||
type: object
|
||||
web.FieldError:
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
field:
|
||||
type: string
|
||||
type: object
|
||||
web.TimeResponse:
|
||||
properties:
|
||||
date:
|
||||
@ -480,6 +465,9 @@ definitions:
|
||||
local_date:
|
||||
example: Tue Jun 25
|
||||
type: string
|
||||
local_time:
|
||||
example: 3:00AM
|
||||
type: string
|
||||
now_rel_time:
|
||||
example: 15 hours from now
|
||||
type: string
|
||||
@ -502,17 +490,41 @@ definitions:
|
||||
example: "2019-06-25T11:00:53.284Z"
|
||||
type: string
|
||||
type: object
|
||||
weberror.ErrorResponse:
|
||||
properties:
|
||||
details:
|
||||
type: string
|
||||
error:
|
||||
type: string
|
||||
fields:
|
||||
items:
|
||||
$ref: '#/definitions/weberror.FieldError'
|
||||
type: array
|
||||
stack_trace:
|
||||
type: string
|
||||
status_code:
|
||||
type: integer
|
||||
type: object
|
||||
weberror.FieldError:
|
||||
properties:
|
||||
display:
|
||||
type: string
|
||||
error:
|
||||
type: string
|
||||
field:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
value:
|
||||
type: object
|
||||
type: object
|
||||
host: '{{.Host}}'
|
||||
info:
|
||||
contact:
|
||||
email: support@geeksinthewoods.com
|
||||
name: API Support
|
||||
url: http://example.com/support
|
||||
description: This is a sample server celler server.
|
||||
contact: {}
|
||||
description: '{{.Description}}'
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
termsOfService: http://example.com/terms
|
||||
title: SaaS Example API
|
||||
version: '{{.Version}}'
|
||||
paths:
|
||||
@ -536,17 +548,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -575,17 +587,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -613,17 +625,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- BasicAuth: []
|
||||
@ -654,7 +666,7 @@ paths:
|
||||
type: integer
|
||||
- description: 'Included Archived, example: false'
|
||||
in: query
|
||||
name: included-archived
|
||||
name: include-archived
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
@ -668,17 +680,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -705,17 +717,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -745,22 +757,22 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -785,17 +797,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -823,17 +835,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -860,17 +872,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -901,12 +913,12 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
summary: Signup handles new account creation.
|
||||
tags:
|
||||
@ -929,17 +941,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -969,7 +981,7 @@ paths:
|
||||
type: integer
|
||||
- description: 'Included Archived, example: false'
|
||||
in: query
|
||||
name: included-archived
|
||||
name: include-archived
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
@ -983,17 +995,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1019,17 +1031,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1059,29 +1071,29 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
summary: Create new user account.
|
||||
tags:
|
||||
- user_account
|
||||
/user_accounts/{id}:
|
||||
/user_accounts/{user_id}/{account_id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@ -1103,17 +1115,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1140,17 +1152,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1182,7 +1194,7 @@ paths:
|
||||
type: integer
|
||||
- description: 'Included Archived, example: false'
|
||||
in: query
|
||||
name: included-archived
|
||||
name: include-archived
|
||||
type: boolean
|
||||
produces:
|
||||
- application/json
|
||||
@ -1196,12 +1208,12 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1227,17 +1239,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1267,17 +1279,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1302,17 +1314,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1340,17 +1352,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1377,17 +1389,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1414,17 +1426,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
@ -1449,17 +1461,17 @@ paths:
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/web.ErrorResponse'
|
||||
$ref: '#/definitions/weberror.ErrorResponse'
|
||||
type: object
|
||||
security:
|
||||
- OAuth2Password: []
|
||||
|
@ -31,9 +31,9 @@ type Account struct {
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "Account ID"
|
||||
// @Success 200 {object} account.AccountResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 404 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 404 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /accounts/{id} [get]
|
||||
func (a *Account) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -78,9 +78,9 @@ func (a *Account) Read(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
||||
// @Security OAuth2Password
|
||||
// @Param data body account.AccountUpdateRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /accounts [patch]
|
||||
func (a *Account) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
|
||||
|
@ -37,9 +37,9 @@ type Project struct {
|
||||
// @Param offset query integer false "Offset, example: 20"
|
||||
// @Param include-archived query boolean false "Included Archived, example: false"
|
||||
// @Success 200 {array} project.ProjectResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /project [get]
|
||||
func (p *Project) Find(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -130,9 +130,9 @@ func (p *Project) Find(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "Project ID"
|
||||
// @Success 200 {object} project.ProjectResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 404 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 404 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /projects/{id} [get]
|
||||
func (p *Project) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -177,10 +177,10 @@ func (p *Project) Read(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
||||
// @Security OAuth2Password
|
||||
// @Param data body project.ProjectCreateRequest true "Project details"
|
||||
// @Success 201 {object} project.ProjectResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 404 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 404 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /projects [post]
|
||||
func (p *Project) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -228,9 +228,9 @@ func (p *Project) Create(ctx context.Context, w http.ResponseWriter, r *http.Req
|
||||
// @Security OAuth2Password
|
||||
// @Param data body project.ProjectUpdateRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /projects [patch]
|
||||
func (p *Project) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -279,9 +279,9 @@ func (p *Project) Update(ctx context.Context, w http.ResponseWriter, r *http.Req
|
||||
// @Security OAuth2Password
|
||||
// @Param data body project.ProjectArchiveRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /projects/archive [patch]
|
||||
func (p *Project) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -330,9 +330,9 @@ func (p *Project) Archive(ctx context.Context, w http.ResponseWriter, r *http.Re
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "Project ID"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /projects/{id} [delete]
|
||||
func (p *Project) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, err := auth.ClaimsFromContext(ctx)
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
_ "geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
_ "geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis"
|
||||
@ -102,9 +103,10 @@ func API(shutdown chan os.Signal, log *log.Logger, env webcontext.Env, masterDB
|
||||
|
||||
// Types godoc
|
||||
// @Summary List of types.
|
||||
// @Param data body web.FieldError false "Field Error"
|
||||
// @Param data body weberror.FieldError false "Field Error"
|
||||
// @Param data body web.TimeResponse false "Time Response"
|
||||
// @Param data body web.EnumResponse false "Enum Response"
|
||||
// @Param data body web.EnumMultiResponse false "Enum Multi Response"
|
||||
// @Param data body web.EnumOption false "Enum Option"
|
||||
// @Param data body signup.SignupAccount false "SignupAccount"
|
||||
// @Param data body signup.SignupUser false "SignupUser"
|
||||
|
@ -30,8 +30,8 @@ type Signup struct {
|
||||
// @Produce json
|
||||
// @Param data body signup.SignupRequest true "Signup details"
|
||||
// @Success 201 {object} signup.SignupResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /signup [post]
|
||||
func (c *Signup) Signup(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
|
@ -43,8 +43,8 @@ type User struct {
|
||||
// @Param offset query integer false "Offset, example: 20"
|
||||
// @Param include-archived query boolean false "Included Archived, example: false"
|
||||
// @Success 200 {array} user.UserResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users [get]
|
||||
func (u *User) Find(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -135,9 +135,9 @@ func (u *User) Find(ctx context.Context, w http.ResponseWriter, r *http.Request,
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "User ID"
|
||||
// @Success 200 {object} user.UserResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 404 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 404 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users/{id} [get]
|
||||
func (u *User) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -182,9 +182,9 @@ func (u *User) Read(ctx context.Context, w http.ResponseWriter, r *http.Request,
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user.UserCreateRequest true "User details"
|
||||
// @Success 201 {object} user.UserResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users [post]
|
||||
func (u *User) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -233,9 +233,9 @@ func (u *User) Create(ctx context.Context, w http.ResponseWriter, r *http.Reques
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user.UserUpdateRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users [patch]
|
||||
func (u *User) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -284,9 +284,9 @@ func (u *User) Update(ctx context.Context, w http.ResponseWriter, r *http.Reques
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user.UserUpdatePasswordRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users/password [patch]
|
||||
func (u *User) UpdatePassword(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -337,9 +337,9 @@ func (u *User) UpdatePassword(ctx context.Context, w http.ResponseWriter, r *htt
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user.UserArchiveRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users/archive [patch]
|
||||
func (u *User) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -388,9 +388,9 @@ func (u *User) Archive(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "User ID"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users/{id} [delete]
|
||||
func (u *User) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, err := auth.ClaimsFromContext(ctx)
|
||||
@ -427,9 +427,9 @@ func (u *User) Delete(ctx context.Context, w http.ResponseWriter, r *http.Reques
|
||||
// @Security OAuth2Password
|
||||
// @Param account_id path int true "Account ID"
|
||||
// @Success 200
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 401 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 401 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /users/switch-account/{account_id} [patch]
|
||||
func (u *User) SwitchAccount(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -472,9 +472,9 @@ func (u *User) SwitchAccount(ctx context.Context, w http.ResponseWriter, r *http
|
||||
// @Security BasicAuth
|
||||
// @Param scope query string false "Scope" Enums(user, admin)
|
||||
// @Success 200
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 401 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 401 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /oauth/token [post]
|
||||
func (u *User) Token(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
|
@ -37,9 +37,9 @@ type UserAccount struct {
|
||||
// @Param offset query integer false "Offset, example: 20"
|
||||
// @Param include-archived query boolean false "Included Archived, example: false"
|
||||
// @Success 200 {array} user_account.UserAccountResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /user_accounts [get]
|
||||
func (u *UserAccount) Find(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -130,9 +130,9 @@ func (u *UserAccount) Find(ctx context.Context, w http.ResponseWriter, r *http.R
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "UserAccount ID"
|
||||
// @Success 200 {object} user_account.UserAccountResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 404 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 404 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /user_accounts/{user_id}/{account_id} [get]
|
||||
func (u *UserAccount) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, ok := ctx.Value(auth.Key).(auth.Claims)
|
||||
@ -178,10 +178,10 @@ func (u *UserAccount) Read(ctx context.Context, w http.ResponseWriter, r *http.R
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user_account.UserAccountCreateRequest true "User Account details"
|
||||
// @Success 201 {object} user_account.UserAccountResponse
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 404 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 404 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /user_accounts [post]
|
||||
func (u *UserAccount) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -230,9 +230,9 @@ func (u *UserAccount) Create(ctx context.Context, w http.ResponseWriter, r *http
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user_account.UserAccountUpdateRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /user_accounts [patch]
|
||||
func (u *UserAccount) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -281,9 +281,9 @@ func (u *UserAccount) Update(ctx context.Context, w http.ResponseWriter, r *http
|
||||
// @Security OAuth2Password
|
||||
// @Param data body user_account.UserAccountArchiveRequest true "Update fields"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /user_accounts/archive [patch]
|
||||
func (u *UserAccount) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
v, err := webcontext.ContextValues(ctx)
|
||||
@ -332,9 +332,9 @@ func (u *UserAccount) Archive(ctx context.Context, w http.ResponseWriter, r *htt
|
||||
// @Security OAuth2Password
|
||||
// @Param id path string true "UserAccount ID"
|
||||
// @Success 204
|
||||
// @Failure 400 {object} web.ErrorResponse
|
||||
// @Failure 403 {object} web.ErrorResponse
|
||||
// @Failure 500 {object} web.ErrorResponse
|
||||
// @Failure 400 {object} weberror.ErrorResponse
|
||||
// @Failure 403 {object} weberror.ErrorResponse
|
||||
// @Failure 500 {object} weberror.ErrorResponse
|
||||
// @Router /user_accounts [delete]
|
||||
func (u *UserAccount) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
claims, err := auth.ClaimsFromContext(ctx)
|
||||
|
@ -2,7 +2,11 @@ package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sethgrid/pester"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
@ -39,12 +43,14 @@ func (h *Root) indexDashboard(ctx context.Context, w http.ResponseWriter, r *htt
|
||||
}
|
||||
|
||||
// indexDefault loads the root index page when a user has no authentication.
|
||||
func (u *Root) indexDefault(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
return u.Renderer.Render(ctx, w, r, tmplLayoutSite, "site-index.gohtml", web.MIMETextHTMLCharsetUTF8, http.StatusOK, nil)
|
||||
func (h *Root) indexDefault(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
return h.Renderer.Render(ctx, w, r, tmplLayoutSite, "site-index.gohtml", web.MIMETextHTMLCharsetUTF8, http.StatusOK, nil)
|
||||
}
|
||||
|
||||
// SitePage loads the page with the layout for site instead of the app base.
|
||||
func (u *Root) SitePage(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
func (h *Root) SitePage(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
|
||||
data := make(map[string]interface{})
|
||||
|
||||
var tmpName string
|
||||
switch r.RequestURI {
|
||||
@ -52,6 +58,47 @@ func (u *Root) SitePage(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
||||
tmpName = "site-index.gohtml"
|
||||
case "/api":
|
||||
tmpName = "site-api.gohtml"
|
||||
|
||||
// http://127.0.0.1:3001/docs/doc.json
|
||||
swaggerJsonUrl := h.ProjectRoutes.ApiDocsJson()
|
||||
|
||||
// Load the json file from the API service.
|
||||
res, err := pester.Get(swaggerJsonUrl)
|
||||
if err != nil {
|
||||
return errors.WithMessagef(err, "Failed to load url '%s' for api documentation.", swaggerJsonUrl)
|
||||
}
|
||||
|
||||
// Read the entire response body.
|
||||
dat, err := ioutil.ReadAll(res.Body)
|
||||
res.Body.Close()
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
// Define the basic JSON struct for the JSON file.
|
||||
type swaggerInfo struct {
|
||||
Description string `json:"description"`
|
||||
Title string `json:"title"`
|
||||
Version string `json:"version"`
|
||||
}
|
||||
type swaggerDoc struct {
|
||||
Schemes []string `json:"schemes"`
|
||||
Swagger string `json:"swagger"`
|
||||
Info swaggerInfo `json:"info"`
|
||||
Host string `json:"host"`
|
||||
BasePath string `json:"basePath"`
|
||||
}
|
||||
|
||||
// JSON decode the response body.
|
||||
var doc swaggerDoc
|
||||
err = json.Unmarshal(dat, &doc)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
data["urlApiBaseUri"] = h.ProjectRoutes.WebApiUrl(doc.BasePath)
|
||||
data["urlApiDocs"] = h.ProjectRoutes.ApiDocs()
|
||||
|
||||
case "/pricing":
|
||||
tmpName = "site-pricing.gohtml"
|
||||
case "/support":
|
||||
@ -64,11 +111,11 @@ func (u *Root) SitePage(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
||||
return web.Redirect(ctx, w, r, "/", http.StatusFound)
|
||||
}
|
||||
|
||||
return u.Renderer.Render(ctx, w, r, tmplLayoutSite, tmpName, web.MIMETextHTMLCharsetUTF8, http.StatusOK, nil)
|
||||
return h.Renderer.Render(ctx, w, r, tmplLayoutSite, tmpName, web.MIMETextHTMLCharsetUTF8, http.StatusOK, data)
|
||||
}
|
||||
|
||||
// IndexHtml redirects /index.html to the website root page.
|
||||
func (u *Root) IndexHtml(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
func (h *Root) IndexHtml(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||
return web.Redirect(ctx, w, r, "/", http.StatusMovedPermanently)
|
||||
}
|
||||
|
||||
|
@ -6,36 +6,31 @@
|
||||
{{ define "content" }}
|
||||
<div class="container" id="page-content">
|
||||
|
||||
|
||||
<h1 class="h1 mt-5 mb-3 text-dark">API</h1>
|
||||
|
||||
<p>Automate your business process via a simple and powerful API. Our API allows you to integrate complex services with our SaaS to go beyond the integrations we provide out of the box.</p>
|
||||
|
||||
<p>API access is only available to clients with the Enterprise plan. If you do not have the Enterprise plan, upgrade your account.</p>
|
||||
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col">
|
||||
<h2>API Documentation</h2>
|
||||
<p>The documentation for the API is available here:</p>
|
||||
<p class="h4"><i class="far fa-window-maximize"></i> <a href="http://127.0.0.1:3001/docs/" target="_blank">http://127.0.0.1:3001/docs/</a></p>
|
||||
<p class="h4"><i class="far fa-window-maximize"></i> <a href="{{ .urlApiDocs }}" target="_blank">{{ .urlApiDocs }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-5 ">
|
||||
<div class="col">
|
||||
|
||||
<h2>Base API URI</h2>
|
||||
|
||||
<p>The API is currently version 1. Thus, the endpoint for the API is:</p>
|
||||
<code>http://127.0.0.1:3001/v1/
|
||||
</code>
|
||||
<code>{{ .urlApiBaseUri }}</code>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-5 ">
|
||||
<div class="col">
|
||||
|
||||
@ -45,7 +40,7 @@
|
||||
|
||||
<h3 class="h5 mt-4">1. Generate an Auth Token</h3>
|
||||
|
||||
<p>At the top of the <a href="http://127.0.0.1:3001/docs/" target="_blank">API Documentation</a> UI, locate the button `Authorize` and click it.</p>
|
||||
<p>At the top of the <a href="{{ .urlApiDocs }}" target="_blank">API Documentation</a> UI, locate the button `Authorize` and click it.</p>
|
||||
|
||||
<p>Find the section `OAuth2Password (OAuth2, password)`.</p>
|
||||
|
||||
@ -70,16 +65,8 @@
|
||||
|
||||
<p>Now that you have an auth token, you can make any number of additional API requests until your auth token expires.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{{end}}
|
||||
{{define "js"}}
|
||||
|
7
go.mod
7
go.mod
@ -26,6 +26,7 @@ require (
|
||||
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365
|
||||
github.com/jmoiron/sqlx v1.2.0
|
||||
github.com/kelseyhightower/envconfig v1.4.0
|
||||
github.com/kr/pty v1.1.8 // indirect
|
||||
github.com/leodido/go-urn v1.1.0 // indirect
|
||||
github.com/lib/pq v1.2.0
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
|
||||
@ -45,13 +46,13 @@ require (
|
||||
github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14
|
||||
github.com/swaggo/swag v1.6.2
|
||||
github.com/tinylib/msgp v1.1.0 // indirect
|
||||
github.com/urfave/cli v1.20.0
|
||||
github.com/urfave/cli v1.21.0
|
||||
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
|
||||
golang.org/x/sys v0.0.0-20190730183949-1393eb018365 // indirect
|
||||
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa // indirect
|
||||
golang.org/x/text v0.3.2
|
||||
golang.org/x/tools v0.0.0-20190730205120-7deaedd405c4 // indirect
|
||||
golang.org/x/tools v0.0.0-20190805222050-c5a2fd39b72a // indirect
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 // indirect
|
||||
google.golang.org/appengine v1.6.1 // indirect
|
||||
gopkg.in/DataDog/dd-trace-go.v1 v1.16.1
|
||||
|
8
go.sum
8
go.sum
@ -1,3 +1,4 @@
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
@ -10,6 +11,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
|
||||
github.com/aws/aws-sdk-go v1.21.8 h1:Lv6hW2twBhC6mGZAuWtqplEpIIqtVctJg02sE7Qn0Zw=
|
||||
github.com/aws/aws-sdk-go v1.21.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/bobesa/go-domain-util v0.0.0-20180815122459-1d708c097a6a/go.mod h1:/mf0HzRK9xVv+1puqGSMzCo7bhEcQhiisuUXlMkq2p4=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
@ -93,6 +95,7 @@ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8=
|
||||
@ -148,6 +151,8 @@ github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU=
|
||||
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/urfave/cli v1.21.0 h1:wYSSj06510qPIzGSua9ZqsncMmWE3Zr55KBERygyrxE=
|
||||
github.com/urfave/cli v1.21.0/go.mod h1:lxDj6qX9Q6lWQxIrbrT0nwecwUtRnhVZAJjJZrVUZZQ=
|
||||
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 h1:zzrxE1FKn5ryBNl9eKOeqQ58Y/Qpo3Q9QNxKHX5uzzQ=
|
||||
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
@ -177,6 +182,7 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190730183949-1393eb018365 h1:SaXEMXhWzMJThc05vu6uh61Q245r4KaWMrsTedk0FDc=
|
||||
golang.org/x/sys v0.0.0-20190730183949-1393eb018365/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
@ -187,6 +193,8 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw
|
||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190730205120-7deaedd405c4 h1:GhbPrljMrt6gCNHHAJcWLDV3nDPFkIm0EEuqY9GtuX0=
|
||||
golang.org/x/tools v0.0.0-20190730205120-7deaedd405c4/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
|
||||
golang.org/x/tools v0.0.0-20190805222050-c5a2fd39b72a h1:0AGI+cC4FJwXNdClvHzfHhJf/yPjKwdo/+m0lPKrdJA=
|
||||
golang.org/x/tools v0.0.0-20190805222050-c5a2fd39b72a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
|
@ -51,3 +51,15 @@ func (r ProjectRoutes) UserInviteAccept(inviteHash string) string {
|
||||
u.Path = "/users/invite/" + inviteHash
|
||||
return u.String()
|
||||
}
|
||||
|
||||
func (r ProjectRoutes) ApiDocs() string {
|
||||
u := r.webApiUrl
|
||||
u.Path = "/docs"
|
||||
return u.String()
|
||||
}
|
||||
|
||||
func (r ProjectRoutes) ApiDocsJson() string {
|
||||
u := r.webApiUrl
|
||||
u.Path = "/docs/doc.json"
|
||||
return u.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user