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.
|
Try to install the packages to your $GOPATH.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
GO111MODULE=off go get github.com/leodido/go-urn
|
GO111MODULE=off go get -u github.com/leodido/go-urn
|
||||||
GO111MODULE=off go get github.com/lib/pq/oid
|
GO111MODULE=off go get -u github.com/lib/pq/oid
|
||||||
GO111MODULE=off go get github.com/lib/pq/scram
|
GO111MODULE=off go get -u github.com/lib/pq/scram
|
||||||
GO111MODULE=off go get github.com/tinylib/msgp/msgp
|
GO111MODULE=off go get -u github.com/tinylib/msgp/msgp
|
||||||
GO111MODULE=off go get gopkg.in/DataDog/dd-trace-go.v1/ddtrace
|
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
|
#### error writing go.mod
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||||
// This file was generated by swaggo/swag at
|
// 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
|
package docs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/alecthomas/template"
|
"github.com/alecthomas/template"
|
||||||
"github.com/swaggo/swag"
|
"github.com/swaggo/swag"
|
||||||
)
|
)
|
||||||
|
|
||||||
var doc = `{
|
var doc = `{
|
||||||
|
"schemes": {{ marshal .Schemes }},
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"description": "This is a sample server celler server.",
|
"description": "{{.Description}}",
|
||||||
"title": "SaaS Example API",
|
"title": "SaaS Example API",
|
||||||
"termsOfService": "http://example.com/terms",
|
"contact": {},
|
||||||
"contact": {
|
|
||||||
"name": "API Support",
|
|
||||||
"url": "http://example.com/support",
|
|
||||||
"email": "support@geeksinthewoods.com"
|
|
||||||
},
|
|
||||||
"license": {
|
"license": {
|
||||||
"name": "Apache 2.0",
|
"name": "Apache 2.0",
|
||||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
@ -67,21 +64,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,21 +123,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,21 +179,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
"description": "Unauthorized",
|
"description": "Unauthorized",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -248,7 +245,7 @@ var doc = `{
|
|||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Included Archived, example: false",
|
"description": "Included Archived, example: false",
|
||||||
"name": "included-archived",
|
"name": "include-archived",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -266,21 +263,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -328,28 +325,28 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -389,21 +386,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -445,21 +442,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -504,21 +501,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -555,21 +552,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -612,14 +609,14 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -671,7 +668,7 @@ var doc = `{
|
|||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Included Archived, example: false",
|
"description": "Included Archived, example: false",
|
||||||
"name": "included-archived",
|
"name": "include-archived",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -689,21 +686,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -749,28 +746,28 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -807,21 +804,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -861,21 +858,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -917,27 +914,27 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user_accounts/{id}": {
|
"/user_accounts/{user_id}/{account_id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@ -976,21 +973,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1042,7 +1039,7 @@ var doc = `{
|
|||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Included Archived, example: false",
|
"description": "Included Archived, example: false",
|
||||||
"name": "included-archived",
|
"name": "include-archived",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1060,14 +1057,14 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1113,21 +1110,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1167,21 +1164,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1223,21 +1220,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1279,21 +1276,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1332,21 +1329,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
"description": "Unauthorized",
|
"description": "Unauthorized",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1391,21 +1388,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1442,21 +1439,21 @@ var doc = `{
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1571,15 +1568,6 @@ var doc = `{
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
},
|
},
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"pending",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "disabled"
|
|
||||||
},
|
|
||||||
"timezone": {
|
"timezone": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "America/Anchorage"
|
"example": "America/Anchorage"
|
||||||
@ -1616,14 +1604,6 @@ var doc = `{
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Rocket Launch"
|
"example": "Rocket Launch"
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "active"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1678,14 +1658,6 @@ var doc = `{
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Rocket Launch to Moon"
|
"example": "Rocket Launch to Moon"
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "disabled"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1764,17 +1736,23 @@ var doc = `{
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"email",
|
"email",
|
||||||
"name",
|
"first_name",
|
||||||
"password"
|
"last_name",
|
||||||
|
"password",
|
||||||
|
"password_confirm"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "{RANDOM_EMAIL}"
|
"example": "{RANDOM_EMAIL}"
|
||||||
},
|
},
|
||||||
"name": {
|
"first_name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May"
|
"example": "Gabi"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "May"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1792,6 +1770,9 @@ var doc = `{
|
|||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"force": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
@ -1802,17 +1783,23 @@ var doc = `{
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"email",
|
"email",
|
||||||
"name",
|
"first_name",
|
||||||
"password"
|
"last_name",
|
||||||
|
"password",
|
||||||
|
"password_confirm"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "gabi@geeksinthewoods.com"
|
"example": "gabi@geeksinthewoods.com"
|
||||||
},
|
},
|
||||||
"name": {
|
"first_name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May"
|
"example": "Gabi"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "May"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1843,13 +1830,24 @@ var doc = `{
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "gabi@geeksinthewoods.com"
|
"example": "gabi@geeksinthewoods.com"
|
||||||
},
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Gabi"
|
||||||
|
},
|
||||||
|
"gravatar": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
},
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "May"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May"
|
"example": "Gabi"
|
||||||
},
|
},
|
||||||
"timezone": {
|
"timezone": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1865,7 +1863,8 @@ var doc = `{
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
"password"
|
"password",
|
||||||
|
"password_confirm"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
@ -1892,11 +1891,15 @@ var doc = `{
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "gabi.may@geeksinthewoods.com"
|
"example": "gabi.may@geeksinthewoods.com"
|
||||||
},
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Gabi May Not"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
},
|
},
|
||||||
"name": {
|
"last_name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May Not"
|
"example": "Gabi May Not"
|
||||||
},
|
},
|
||||||
@ -1948,15 +1951,6 @@ var doc = `{
|
|||||||
"admin"
|
"admin"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"invited",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "active"
|
|
||||||
},
|
|
||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
@ -1981,10 +1975,6 @@ var doc = `{
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.TimeResponse"
|
"$ref": "#/definitions/web.TimeResponse"
|
||||||
},
|
},
|
||||||
"id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
|
||||||
},
|
|
||||||
"roles": {
|
"roles": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@ -2036,21 +2026,32 @@ var doc = `{
|
|||||||
"user"
|
"user"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"invited",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "disabled"
|
|
||||||
},
|
|
||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"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": {
|
"web.EnumOption": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"web.TimeResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -2131,6 +2107,10 @@ var doc = `{
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Tue Jun 25"
|
"example": "Tue Jun 25"
|
||||||
},
|
},
|
||||||
|
"local_time": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "3:00AM"
|
||||||
|
},
|
||||||
"now_rel_time": {
|
"now_rel_time": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "15 hours from now"
|
"example": "15 hours from now"
|
||||||
@ -2160,6 +2140,49 @@ var doc = `{
|
|||||||
"example": "2019-06-25T11:00:53.284Z"
|
"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": {
|
"securityDefinitions": {
|
||||||
@ -2182,17 +2205,23 @@ type swaggerInfo struct {
|
|||||||
Version string
|
Version string
|
||||||
Host string
|
Host string
|
||||||
BasePath string
|
BasePath string
|
||||||
|
Schemes []string
|
||||||
Title string
|
Title string
|
||||||
Description string
|
Description string
|
||||||
}
|
}
|
||||||
|
|
||||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||||
var SwaggerInfo swaggerInfo
|
var SwaggerInfo = swaggerInfo{Schemes: []string{}}
|
||||||
|
|
||||||
type s struct{}
|
type s struct{}
|
||||||
|
|
||||||
func (s *s) ReadDoc() string {
|
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 {
|
if err != nil {
|
||||||
return doc
|
return doc
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"description": "This is a sample server celler server.",
|
"description": "{{.Description}}",
|
||||||
"title": "SaaS Example API",
|
"title": "SaaS Example API",
|
||||||
"termsOfService": "http://example.com/terms",
|
"contact": {},
|
||||||
"contact": {
|
|
||||||
"name": "API Support",
|
|
||||||
"url": "http://example.com/support",
|
|
||||||
"email": "support@geeksinthewoods.com"
|
|
||||||
},
|
|
||||||
"license": {
|
"license": {
|
||||||
"name": "Apache 2.0",
|
"name": "Apache 2.0",
|
||||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
@ -54,21 +49,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,21 +108,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,21 +164,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
"description": "Unauthorized",
|
"description": "Unauthorized",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -235,7 +230,7 @@
|
|||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Included Archived, example: false",
|
"description": "Included Archived, example: false",
|
||||||
"name": "included-archived",
|
"name": "include-archived",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -253,21 +248,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -315,28 +310,28 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -376,21 +371,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -432,21 +427,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -491,21 +486,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -542,21 +537,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -599,14 +594,14 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,7 +653,7 @@
|
|||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Included Archived, example: false",
|
"description": "Included Archived, example: false",
|
||||||
"name": "included-archived",
|
"name": "include-archived",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -676,21 +671,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -736,28 +731,28 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -794,21 +789,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -848,21 +843,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -904,27 +899,27 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/user_accounts/{id}": {
|
"/user_accounts/{user_id}/{account_id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@ -963,21 +958,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1029,7 +1024,7 @@
|
|||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Included Archived, example: false",
|
"description": "Included Archived, example: false",
|
||||||
"name": "included-archived",
|
"name": "include-archived",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1047,14 +1042,14 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1100,21 +1095,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1154,21 +1149,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1210,21 +1205,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1266,21 +1261,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1319,21 +1314,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"401": {
|
"401": {
|
||||||
"description": "Unauthorized",
|
"description": "Unauthorized",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1378,21 +1373,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not Found",
|
"description": "Not Found",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1429,21 +1424,21 @@
|
|||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "Forbidden",
|
"description": "Forbidden",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"500": {
|
"500": {
|
||||||
"description": "Internal Server Error",
|
"description": "Internal Server Error",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.ErrorResponse"
|
"$ref": "#/definitions/weberror.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1558,15 +1553,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
},
|
},
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"pending",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "disabled"
|
|
||||||
},
|
|
||||||
"timezone": {
|
"timezone": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "America/Anchorage"
|
"example": "America/Anchorage"
|
||||||
@ -1603,14 +1589,6 @@
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Rocket Launch"
|
"example": "Rocket Launch"
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "active"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1665,14 +1643,6 @@
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Rocket Launch to Moon"
|
"example": "Rocket Launch to Moon"
|
||||||
},
|
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "disabled"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1751,17 +1721,23 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"email",
|
"email",
|
||||||
"name",
|
"first_name",
|
||||||
"password"
|
"last_name",
|
||||||
|
"password",
|
||||||
|
"password_confirm"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "{RANDOM_EMAIL}"
|
"example": "{RANDOM_EMAIL}"
|
||||||
},
|
},
|
||||||
"name": {
|
"first_name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May"
|
"example": "Gabi"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "May"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1779,6 +1755,9 @@
|
|||||||
"id"
|
"id"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"force": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
@ -1789,17 +1768,23 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"email",
|
"email",
|
||||||
"name",
|
"first_name",
|
||||||
"password"
|
"last_name",
|
||||||
|
"password",
|
||||||
|
"password_confirm"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"email": {
|
"email": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "gabi@geeksinthewoods.com"
|
"example": "gabi@geeksinthewoods.com"
|
||||||
},
|
},
|
||||||
"name": {
|
"first_name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May"
|
"example": "Gabi"
|
||||||
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "May"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1830,13 +1815,24 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "gabi@geeksinthewoods.com"
|
"example": "gabi@geeksinthewoods.com"
|
||||||
},
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Gabi"
|
||||||
|
},
|
||||||
|
"gravatar": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
},
|
},
|
||||||
|
"last_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "May"
|
||||||
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May"
|
"example": "Gabi"
|
||||||
},
|
},
|
||||||
"timezone": {
|
"timezone": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -1852,7 +1848,8 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
"password"
|
"password",
|
||||||
|
"password_confirm"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
@ -1879,11 +1876,15 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "gabi.may@geeksinthewoods.com"
|
"example": "gabi.may@geeksinthewoods.com"
|
||||||
},
|
},
|
||||||
|
"first_name": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Gabi May Not"
|
||||||
|
},
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
},
|
},
|
||||||
"name": {
|
"last_name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Gabi May Not"
|
"example": "Gabi May Not"
|
||||||
},
|
},
|
||||||
@ -1935,15 +1936,6 @@
|
|||||||
"admin"
|
"admin"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"invited",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "active"
|
|
||||||
},
|
|
||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
||||||
@ -1968,10 +1960,6 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/web.TimeResponse"
|
"$ref": "#/definitions/web.TimeResponse"
|
||||||
},
|
},
|
||||||
"id": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
|
||||||
},
|
|
||||||
"roles": {
|
"roles": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
@ -2023,21 +2011,32 @@
|
|||||||
"user"
|
"user"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"status": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"active",
|
|
||||||
"invited",
|
|
||||||
"disabled"
|
|
||||||
],
|
|
||||||
"example": "disabled"
|
|
||||||
},
|
|
||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "d69bdef7-173f-4d29-b52c-3edc60baf6a2"
|
"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": {
|
"web.EnumOption": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"web.TimeResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -2118,6 +2092,10 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Tue Jun 25"
|
"example": "Tue Jun 25"
|
||||||
},
|
},
|
||||||
|
"local_time": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "3:00AM"
|
||||||
|
},
|
||||||
"now_rel_time": {
|
"now_rel_time": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "15 hours from now"
|
"example": "15 hours from now"
|
||||||
@ -2147,6 +2125,49 @@
|
|||||||
"example": "2019-06-25T11:00:53.284Z"
|
"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": {
|
"securityDefinitions": {
|
||||||
|
@ -77,13 +77,6 @@ definitions:
|
|||||||
signup_user_id:
|
signup_user_id:
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||||
type: string
|
type: string
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- active
|
|
||||||
- pending
|
|
||||||
- disabled
|
|
||||||
example: disabled
|
|
||||||
type: string
|
|
||||||
timezone:
|
timezone:
|
||||||
example: America/Anchorage
|
example: America/Anchorage
|
||||||
type: string
|
type: string
|
||||||
@ -109,12 +102,6 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
example: Rocket Launch
|
example: Rocket Launch
|
||||||
type: string
|
type: string
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- active
|
|
||||||
- disabled
|
|
||||||
example: active
|
|
||||||
type: string
|
|
||||||
required:
|
required:
|
||||||
- account_id
|
- account_id
|
||||||
- name
|
- name
|
||||||
@ -155,12 +142,6 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
example: Rocket Launch to Moon
|
example: Rocket Launch to Moon
|
||||||
type: string
|
type: string
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- active
|
|
||||||
- disabled
|
|
||||||
example: disabled
|
|
||||||
type: string
|
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
type: object
|
type: object
|
||||||
@ -221,8 +202,11 @@ definitions:
|
|||||||
email:
|
email:
|
||||||
example: '{RANDOM_EMAIL}'
|
example: '{RANDOM_EMAIL}'
|
||||||
type: string
|
type: string
|
||||||
name:
|
first_name:
|
||||||
example: Gabi May
|
example: Gabi
|
||||||
|
type: string
|
||||||
|
last_name:
|
||||||
|
example: May
|
||||||
type: string
|
type: string
|
||||||
password:
|
password:
|
||||||
example: SecretString
|
example: SecretString
|
||||||
@ -232,11 +216,15 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- email
|
- email
|
||||||
- name
|
- first_name
|
||||||
|
- last_name
|
||||||
- password
|
- password
|
||||||
|
- password_confirm
|
||||||
type: object
|
type: object
|
||||||
user.UserArchiveRequest:
|
user.UserArchiveRequest:
|
||||||
properties:
|
properties:
|
||||||
|
force:
|
||||||
|
type: boolean
|
||||||
id:
|
id:
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||||
type: string
|
type: string
|
||||||
@ -248,8 +236,11 @@ definitions:
|
|||||||
email:
|
email:
|
||||||
example: gabi@geeksinthewoods.com
|
example: gabi@geeksinthewoods.com
|
||||||
type: string
|
type: string
|
||||||
name:
|
first_name:
|
||||||
example: Gabi May
|
example: Gabi
|
||||||
|
type: string
|
||||||
|
last_name:
|
||||||
|
example: May
|
||||||
type: string
|
type: string
|
||||||
password:
|
password:
|
||||||
example: SecretString
|
example: SecretString
|
||||||
@ -262,8 +253,10 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- email
|
- email
|
||||||
- name
|
- first_name
|
||||||
|
- last_name
|
||||||
- password
|
- password
|
||||||
|
- password_confirm
|
||||||
type: object
|
type: object
|
||||||
user.UserResponse:
|
user.UserResponse:
|
||||||
properties:
|
properties:
|
||||||
@ -276,11 +269,19 @@ definitions:
|
|||||||
email:
|
email:
|
||||||
example: gabi@geeksinthewoods.com
|
example: gabi@geeksinthewoods.com
|
||||||
type: string
|
type: string
|
||||||
|
first_name:
|
||||||
|
example: Gabi
|
||||||
|
type: string
|
||||||
|
gravatar:
|
||||||
|
type: string
|
||||||
id:
|
id:
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||||
type: string
|
type: string
|
||||||
|
last_name:
|
||||||
|
example: May
|
||||||
|
type: string
|
||||||
name:
|
name:
|
||||||
example: Gabi May
|
example: Gabi
|
||||||
type: string
|
type: string
|
||||||
timezone:
|
timezone:
|
||||||
example: America/Anchorage
|
example: America/Anchorage
|
||||||
@ -303,16 +304,20 @@ definitions:
|
|||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- password
|
- password
|
||||||
|
- password_confirm
|
||||||
type: object
|
type: object
|
||||||
user.UserUpdateRequest:
|
user.UserUpdateRequest:
|
||||||
properties:
|
properties:
|
||||||
email:
|
email:
|
||||||
example: gabi.may@geeksinthewoods.com
|
example: gabi.may@geeksinthewoods.com
|
||||||
type: string
|
type: string
|
||||||
|
first_name:
|
||||||
|
example: Gabi May Not
|
||||||
|
type: string
|
||||||
id:
|
id:
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||||
type: string
|
type: string
|
||||||
name:
|
last_name:
|
||||||
example: Gabi May Not
|
example: Gabi May Not
|
||||||
type: string
|
type: string
|
||||||
timezone:
|
timezone:
|
||||||
@ -347,13 +352,6 @@ definitions:
|
|||||||
- user
|
- user
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- active
|
|
||||||
- invited
|
|
||||||
- disabled
|
|
||||||
example: active
|
|
||||||
type: string
|
|
||||||
user_id:
|
user_id:
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||||
type: string
|
type: string
|
||||||
@ -373,9 +371,6 @@ definitions:
|
|||||||
created_at:
|
created_at:
|
||||||
$ref: '#/definitions/web.TimeResponse'
|
$ref: '#/definitions/web.TimeResponse'
|
||||||
type: object
|
type: object
|
||||||
id:
|
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
|
||||||
type: string
|
|
||||||
roles:
|
roles:
|
||||||
example:
|
example:
|
||||||
- admin
|
- admin
|
||||||
@ -411,13 +406,6 @@ definitions:
|
|||||||
- user
|
- user
|
||||||
type: string
|
type: string
|
||||||
type: array
|
type: array
|
||||||
status:
|
|
||||||
enum:
|
|
||||||
- active
|
|
||||||
- invited
|
|
||||||
- disabled
|
|
||||||
example: disabled
|
|
||||||
type: string
|
|
||||||
user_id:
|
user_id:
|
||||||
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
example: d69bdef7-173f-4d29-b52c-3edc60baf6a2
|
||||||
type: string
|
type: string
|
||||||
@ -425,6 +413,19 @@ definitions:
|
|||||||
- account_id
|
- account_id
|
||||||
- user_id
|
- user_id
|
||||||
type: object
|
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:
|
web.EnumOption:
|
||||||
properties:
|
properties:
|
||||||
selected:
|
selected:
|
||||||
@ -450,22 +451,6 @@ definitions:
|
|||||||
example: active_etc
|
example: active_etc
|
||||||
type: string
|
type: string
|
||||||
type: object
|
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:
|
web.TimeResponse:
|
||||||
properties:
|
properties:
|
||||||
date:
|
date:
|
||||||
@ -480,6 +465,9 @@ definitions:
|
|||||||
local_date:
|
local_date:
|
||||||
example: Tue Jun 25
|
example: Tue Jun 25
|
||||||
type: string
|
type: string
|
||||||
|
local_time:
|
||||||
|
example: 3:00AM
|
||||||
|
type: string
|
||||||
now_rel_time:
|
now_rel_time:
|
||||||
example: 15 hours from now
|
example: 15 hours from now
|
||||||
type: string
|
type: string
|
||||||
@ -502,17 +490,41 @@ definitions:
|
|||||||
example: "2019-06-25T11:00:53.284Z"
|
example: "2019-06-25T11:00:53.284Z"
|
||||||
type: string
|
type: string
|
||||||
type: object
|
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}}'
|
host: '{{.Host}}'
|
||||||
info:
|
info:
|
||||||
contact:
|
contact: {}
|
||||||
email: support@geeksinthewoods.com
|
description: '{{.Description}}'
|
||||||
name: API Support
|
|
||||||
url: http://example.com/support
|
|
||||||
description: This is a sample server celler server.
|
|
||||||
license:
|
license:
|
||||||
name: Apache 2.0
|
name: Apache 2.0
|
||||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
termsOfService: http://example.com/terms
|
|
||||||
title: SaaS Example API
|
title: SaaS Example API
|
||||||
version: '{{.Version}}'
|
version: '{{.Version}}'
|
||||||
paths:
|
paths:
|
||||||
@ -536,17 +548,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -575,17 +587,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"404":
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -613,17 +625,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"401":
|
"401":
|
||||||
description: Unauthorized
|
description: Unauthorized
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- BasicAuth: []
|
- BasicAuth: []
|
||||||
@ -654,7 +666,7 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
- description: 'Included Archived, example: false'
|
- description: 'Included Archived, example: false'
|
||||||
in: query
|
in: query
|
||||||
name: included-archived
|
name: include-archived
|
||||||
type: boolean
|
type: boolean
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
@ -668,17 +680,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -705,17 +717,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -745,22 +757,22 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"404":
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -785,17 +797,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -823,17 +835,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"404":
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -860,17 +872,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -901,12 +913,12 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
summary: Signup handles new account creation.
|
summary: Signup handles new account creation.
|
||||||
tags:
|
tags:
|
||||||
@ -929,17 +941,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -969,7 +981,7 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
- description: 'Included Archived, example: false'
|
- description: 'Included Archived, example: false'
|
||||||
in: query
|
in: query
|
||||||
name: included-archived
|
name: include-archived
|
||||||
type: boolean
|
type: boolean
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
@ -983,17 +995,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1019,17 +1031,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1059,29 +1071,29 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"404":
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
summary: Create new user account.
|
summary: Create new user account.
|
||||||
tags:
|
tags:
|
||||||
- user_account
|
- user_account
|
||||||
/user_accounts/{id}:
|
/user_accounts/{user_id}/{account_id}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@ -1103,17 +1115,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"404":
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1140,17 +1152,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1182,7 +1194,7 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
- description: 'Included Archived, example: false'
|
- description: 'Included Archived, example: false'
|
||||||
in: query
|
in: query
|
||||||
name: included-archived
|
name: include-archived
|
||||||
type: boolean
|
type: boolean
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
@ -1196,12 +1208,12 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1227,17 +1239,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1267,17 +1279,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1302,17 +1314,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1340,17 +1352,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"404":
|
"404":
|
||||||
description: Not Found
|
description: Not Found
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1377,17 +1389,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1414,17 +1426,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: Forbidden
|
description: Forbidden
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
@ -1449,17 +1461,17 @@ paths:
|
|||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"401":
|
"401":
|
||||||
description: Unauthorized
|
description: Unauthorized
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
"500":
|
"500":
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/web.ErrorResponse'
|
$ref: '#/definitions/weberror.ErrorResponse'
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- OAuth2Password: []
|
- OAuth2Password: []
|
||||||
|
@ -31,9 +31,9 @@ type Account struct {
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "Account ID"
|
// @Param id path string true "Account ID"
|
||||||
// @Success 200 {object} account.AccountResponse
|
// @Success 200 {object} account.AccountResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 404 {object} web.ErrorResponse
|
// @Failure 404 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /accounts/{id} [get]
|
// @Router /accounts/{id} [get]
|
||||||
func (a *Account) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param data body account.AccountUpdateRequest true "Update fields"
|
// @Param data body account.AccountUpdateRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /accounts [patch]
|
// @Router /accounts [patch]
|
||||||
func (a *Account) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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 offset query integer false "Offset, example: 20"
|
||||||
// @Param include-archived query boolean false "Included Archived, example: false"
|
// @Param include-archived query boolean false "Included Archived, example: false"
|
||||||
// @Success 200 {array} project.ProjectResponse
|
// @Success 200 {array} project.ProjectResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /project [get]
|
// @Router /project [get]
|
||||||
func (p *Project) Find(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "Project ID"
|
// @Param id path string true "Project ID"
|
||||||
// @Success 200 {object} project.ProjectResponse
|
// @Success 200 {object} project.ProjectResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 404 {object} web.ErrorResponse
|
// @Failure 404 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /projects/{id} [get]
|
// @Router /projects/{id} [get]
|
||||||
func (p *Project) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param data body project.ProjectCreateRequest true "Project details"
|
// @Param data body project.ProjectCreateRequest true "Project details"
|
||||||
// @Success 201 {object} project.ProjectResponse
|
// @Success 201 {object} project.ProjectResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 404 {object} web.ErrorResponse
|
// @Failure 404 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /projects [post]
|
// @Router /projects [post]
|
||||||
func (p *Project) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (p *Project) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -228,9 +228,9 @@ func (p *Project) Create(ctx context.Context, w http.ResponseWriter, r *http.Req
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body project.ProjectUpdateRequest true "Update fields"
|
// @Param data body project.ProjectUpdateRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /projects [patch]
|
// @Router /projects [patch]
|
||||||
func (p *Project) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (p *Project) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -279,9 +279,9 @@ func (p *Project) Update(ctx context.Context, w http.ResponseWriter, r *http.Req
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body project.ProjectArchiveRequest true "Update fields"
|
// @Param data body project.ProjectArchiveRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /projects/archive [patch]
|
// @Router /projects/archive [patch]
|
||||||
func (p *Project) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (p *Project) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -330,9 +330,9 @@ func (p *Project) Archive(ctx context.Context, w http.ResponseWriter, r *http.Re
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "Project ID"
|
// @Param id path string true "Project ID"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /projects/{id} [delete]
|
// @Router /projects/{id} [delete]
|
||||||
func (p *Project) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (p *Project) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
claims, err := auth.ClaimsFromContext(ctx)
|
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/auth"
|
||||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
"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/webcontext"
|
||||||
|
_ "geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||||
_ "geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
_ "geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||||
"github.com/jmoiron/sqlx"
|
"github.com/jmoiron/sqlx"
|
||||||
"gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis"
|
"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
|
// Types godoc
|
||||||
// @Summary List of types.
|
// @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.TimeResponse false "Time Response"
|
||||||
// @Param data body web.EnumResponse false "Enum 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 web.EnumOption false "Enum Option"
|
||||||
// @Param data body signup.SignupAccount false "SignupAccount"
|
// @Param data body signup.SignupAccount false "SignupAccount"
|
||||||
// @Param data body signup.SignupUser false "SignupUser"
|
// @Param data body signup.SignupUser false "SignupUser"
|
||||||
|
@ -30,8 +30,8 @@ type Signup struct {
|
|||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param data body signup.SignupRequest true "Signup details"
|
// @Param data body signup.SignupRequest true "Signup details"
|
||||||
// @Success 201 {object} signup.SignupResponse
|
// @Success 201 {object} signup.SignupResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /signup [post]
|
// @Router /signup [post]
|
||||||
func (c *Signup) Signup(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (c *Signup) Signup(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
|
@ -43,8 +43,8 @@ type User struct {
|
|||||||
// @Param offset query integer false "Offset, example: 20"
|
// @Param offset query integer false "Offset, example: 20"
|
||||||
// @Param include-archived query boolean false "Included Archived, example: false"
|
// @Param include-archived query boolean false "Included Archived, example: false"
|
||||||
// @Success 200 {array} user.UserResponse
|
// @Success 200 {array} user.UserResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users [get]
|
// @Router /users [get]
|
||||||
func (u *User) Find(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "User ID"
|
// @Param id path string true "User ID"
|
||||||
// @Success 200 {object} user.UserResponse
|
// @Success 200 {object} user.UserResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 404 {object} web.ErrorResponse
|
// @Failure 404 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users/{id} [get]
|
// @Router /users/{id} [get]
|
||||||
func (u *User) Read(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param data body user.UserCreateRequest true "User details"
|
// @Param data body user.UserCreateRequest true "User details"
|
||||||
// @Success 201 {object} user.UserResponse
|
// @Success 201 {object} user.UserResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users [post]
|
// @Router /users [post]
|
||||||
func (u *User) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *User) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -233,9 +233,9 @@ func (u *User) Create(ctx context.Context, w http.ResponseWriter, r *http.Reques
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body user.UserUpdateRequest true "Update fields"
|
// @Param data body user.UserUpdateRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users [patch]
|
// @Router /users [patch]
|
||||||
func (u *User) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *User) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -284,9 +284,9 @@ func (u *User) Update(ctx context.Context, w http.ResponseWriter, r *http.Reques
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body user.UserUpdatePasswordRequest true "Update fields"
|
// @Param data body user.UserUpdatePasswordRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users/password [patch]
|
// @Router /users/password [patch]
|
||||||
func (u *User) UpdatePassword(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *User) UpdatePassword(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -337,9 +337,9 @@ func (u *User) UpdatePassword(ctx context.Context, w http.ResponseWriter, r *htt
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body user.UserArchiveRequest true "Update fields"
|
// @Param data body user.UserArchiveRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users/archive [patch]
|
// @Router /users/archive [patch]
|
||||||
func (u *User) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *User) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -388,9 +388,9 @@ func (u *User) Archive(ctx context.Context, w http.ResponseWriter, r *http.Reque
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "User ID"
|
// @Param id path string true "User ID"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users/{id} [delete]
|
// @Router /users/{id} [delete]
|
||||||
func (u *User) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *User) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
claims, err := auth.ClaimsFromContext(ctx)
|
claims, err := auth.ClaimsFromContext(ctx)
|
||||||
@ -427,9 +427,9 @@ func (u *User) Delete(ctx context.Context, w http.ResponseWriter, r *http.Reques
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param account_id path int true "Account ID"
|
// @Param account_id path int true "Account ID"
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 401 {object} web.ErrorResponse
|
// @Failure 401 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /users/switch-account/{account_id} [patch]
|
// @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 {
|
func (u *User) SwitchAccount(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -472,9 +472,9 @@ func (u *User) SwitchAccount(ctx context.Context, w http.ResponseWriter, r *http
|
|||||||
// @Security BasicAuth
|
// @Security BasicAuth
|
||||||
// @Param scope query string false "Scope" Enums(user, admin)
|
// @Param scope query string false "Scope" Enums(user, admin)
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 401 {object} web.ErrorResponse
|
// @Failure 401 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /oauth/token [post]
|
// @Router /oauth/token [post]
|
||||||
func (u *User) Token(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *User) Token(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
|
@ -37,9 +37,9 @@ type UserAccount struct {
|
|||||||
// @Param offset query integer false "Offset, example: 20"
|
// @Param offset query integer false "Offset, example: 20"
|
||||||
// @Param include-archived query boolean false "Included Archived, example: false"
|
// @Param include-archived query boolean false "Included Archived, example: false"
|
||||||
// @Success 200 {array} user_account.UserAccountResponse
|
// @Success 200 {array} user_account.UserAccountResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /user_accounts [get]
|
// @Router /user_accounts [get]
|
||||||
func (u *UserAccount) Find(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "UserAccount ID"
|
// @Param id path string true "UserAccount ID"
|
||||||
// @Success 200 {object} user_account.UserAccountResponse
|
// @Success 200 {object} user_account.UserAccountResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 404 {object} web.ErrorResponse
|
// @Failure 404 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /user_accounts/{user_id}/{account_id} [get]
|
// @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 {
|
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)
|
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
|
// @Security OAuth2Password
|
||||||
// @Param data body user_account.UserAccountCreateRequest true "User Account details"
|
// @Param data body user_account.UserAccountCreateRequest true "User Account details"
|
||||||
// @Success 201 {object} user_account.UserAccountResponse
|
// @Success 201 {object} user_account.UserAccountResponse
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 404 {object} web.ErrorResponse
|
// @Failure 404 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /user_accounts [post]
|
// @Router /user_accounts [post]
|
||||||
func (u *UserAccount) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *UserAccount) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -230,9 +230,9 @@ func (u *UserAccount) Create(ctx context.Context, w http.ResponseWriter, r *http
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body user_account.UserAccountUpdateRequest true "Update fields"
|
// @Param data body user_account.UserAccountUpdateRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /user_accounts [patch]
|
// @Router /user_accounts [patch]
|
||||||
func (u *UserAccount) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *UserAccount) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -281,9 +281,9 @@ func (u *UserAccount) Update(ctx context.Context, w http.ResponseWriter, r *http
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param data body user_account.UserAccountArchiveRequest true "Update fields"
|
// @Param data body user_account.UserAccountArchiveRequest true "Update fields"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /user_accounts/archive [patch]
|
// @Router /user_accounts/archive [patch]
|
||||||
func (u *UserAccount) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *UserAccount) Archive(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
v, err := webcontext.ContextValues(ctx)
|
v, err := webcontext.ContextValues(ctx)
|
||||||
@ -332,9 +332,9 @@ func (u *UserAccount) Archive(ctx context.Context, w http.ResponseWriter, r *htt
|
|||||||
// @Security OAuth2Password
|
// @Security OAuth2Password
|
||||||
// @Param id path string true "UserAccount ID"
|
// @Param id path string true "UserAccount ID"
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Failure 400 {object} web.ErrorResponse
|
// @Failure 400 {object} weberror.ErrorResponse
|
||||||
// @Failure 403 {object} web.ErrorResponse
|
// @Failure 403 {object} weberror.ErrorResponse
|
||||||
// @Failure 500 {object} web.ErrorResponse
|
// @Failure 500 {object} weberror.ErrorResponse
|
||||||
// @Router /user_accounts [delete]
|
// @Router /user_accounts [delete]
|
||||||
func (u *UserAccount) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
func (u *UserAccount) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error {
|
||||||
claims, err := auth.ClaimsFromContext(ctx)
|
claims, err := auth.ClaimsFromContext(ctx)
|
||||||
|
@ -2,7 +2,11 @@ package handlers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"github.com/sethgrid/pester"
|
||||||
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
"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.
|
// 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 {
|
func (h *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)
|
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.
|
// 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
|
var tmpName string
|
||||||
switch r.RequestURI {
|
switch r.RequestURI {
|
||||||
@ -52,6 +58,47 @@ func (u *Root) SitePage(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
|||||||
tmpName = "site-index.gohtml"
|
tmpName = "site-index.gohtml"
|
||||||
case "/api":
|
case "/api":
|
||||||
tmpName = "site-api.gohtml"
|
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":
|
case "/pricing":
|
||||||
tmpName = "site-pricing.gohtml"
|
tmpName = "site-pricing.gohtml"
|
||||||
case "/support":
|
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 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.
|
// 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)
|
return web.Redirect(ctx, w, r, "/", http.StatusMovedPermanently)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,36 +6,31 @@
|
|||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<div class="container" id="page-content">
|
<div class="container" id="page-content">
|
||||||
|
|
||||||
|
|
||||||
<h1 class="h1 mt-5 mb-3 text-dark">API</h1>
|
<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>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>
|
<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="row mt-5">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h2>API Documentation</h2>
|
<h2>API Documentation</h2>
|
||||||
<p>The documentation for the API is available here:</p>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row mt-5 ">
|
<div class="row mt-5 ">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<h2>Base API URI</h2>
|
<h2>Base API URI</h2>
|
||||||
|
|
||||||
<p>The API is currently version 1. Thus, the endpoint for the API is:</p>
|
<p>The API is currently version 1. Thus, the endpoint for the API is:</p>
|
||||||
<code>http://127.0.0.1:3001/v1/
|
<code>{{ .urlApiBaseUri }}</code>
|
||||||
</code>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row mt-5 ">
|
<div class="row mt-5 ">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
@ -45,7 +40,7 @@
|
|||||||
|
|
||||||
<h3 class="h5 mt-4">1. Generate an Auth Token</h3>
|
<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>
|
<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>
|
<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>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "js"}}
|
{{define "js"}}
|
||||||
|
7
go.mod
7
go.mod
@ -26,6 +26,7 @@ require (
|
|||||||
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365
|
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365
|
||||||
github.com/jmoiron/sqlx v1.2.0
|
github.com/jmoiron/sqlx v1.2.0
|
||||||
github.com/kelseyhightower/envconfig v1.4.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/leodido/go-urn v1.1.0 // indirect
|
||||||
github.com/lib/pq v1.2.0
|
github.com/lib/pq v1.2.0
|
||||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
|
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/files v0.0.0-20190704085106-630677cd5c14
|
||||||
github.com/swaggo/swag v1.6.2
|
github.com/swaggo/swag v1.6.2
|
||||||
github.com/tinylib/msgp v1.1.0 // indirect
|
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
|
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
|
||||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
|
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
|
||||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
|
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/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
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 // indirect
|
||||||
google.golang.org/appengine v1.6.1 // indirect
|
google.golang.org/appengine v1.6.1 // indirect
|
||||||
gopkg.in/DataDog/dd-trace-go.v1 v1.16.1
|
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 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
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=
|
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 h1:Lv6hW2twBhC6mGZAuWtqplEpIIqtVctJg02sE7Qn0Zw=
|
||||||
github.com/aws/aws-sdk-go v1.21.8/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
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/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 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.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
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/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.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
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 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
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=
|
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/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 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.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 h1:zzrxE1FKn5ryBNl9eKOeqQ58Y/Qpo3Q9QNxKHX5uzzQ=
|
||||||
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY=
|
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=
|
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-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 h1:SaXEMXhWzMJThc05vu6uh61Q245r4KaWMrsTedk0FDc=
|
||||||
golang.org/x/sys v0.0.0-20190730183949-1393eb018365/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
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 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
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-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 h1:GhbPrljMrt6gCNHHAJcWLDV3nDPFkIm0EEuqY9GtuX0=
|
||||||
golang.org/x/tools v0.0.0-20190730205120-7deaedd405c4/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
|
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 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
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=
|
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
|
u.Path = "/users/invite/" + inviteHash
|
||||||
return u.String()
|
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