switch to zero log

This commit is contained in:
Hayden 2022-09-03 10:38:35 -08:00
parent 9351b3fd42
commit 68204a4f22
26 changed files with 122 additions and 1335 deletions

View file

@ -52,215 +52,6 @@ const docTemplate = `{
}
}
},
"/v1/admin/users": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Gets all users from the database",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"type": "array",
"items": {
"$ref": "#/definitions/ent.User"
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Create a new user",
"parameters": [
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/ent.User"
}
}
}
]
}
}
}
}
},
"/v1/admin/users/{id}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Get a user from the database",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/ent.User"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Update a User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/ent.User"
}
}
}
]
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Delete a User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
}
}
}
},
"/v1/items": {
"get": {
"security": [
@ -1643,9 +1434,6 @@ const docTemplate = `{
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
@ -1680,9 +1468,6 @@ const docTemplate = `{
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
@ -1709,9 +1494,6 @@ const docTemplate = `{
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
@ -1734,26 +1516,6 @@ const docTemplate = `{
}
}
},
"types.UserCreate": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"groupID": {
"type": "string"
},
"isSuperuser": {
"type": "boolean"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"types.UserIn": {
"type": "object",
"properties": {

View file

@ -44,215 +44,6 @@
}
}
},
"/v1/admin/users": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Gets all users from the database",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"type": "array",
"items": {
"$ref": "#/definitions/ent.User"
}
}
}
}
]
}
}
}
},
"post": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Create a new user",
"parameters": [
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserCreate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/ent.User"
}
}
}
]
}
}
}
}
},
"/v1/admin/users/{id}": {
"get": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Get a user from the database",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/ent.User"
}
}
}
]
}
}
}
},
"put": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Update a User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "User Data",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/types.UserUpdate"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/server.Result"
},
{
"type": "object",
"properties": {
"item": {
"$ref": "#/definitions/ent.User"
}
}
}
]
}
}
}
},
"delete": {
"security": [
{
"Bearer": []
}
],
"produces": [
"application/json"
],
"tags": [
"Admin: Users"
],
"summary": "Delete a User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": ""
}
}
}
},
"/v1/items": {
"get": {
"security": [
@ -1635,9 +1426,6 @@
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
@ -1672,9 +1460,6 @@
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
@ -1701,9 +1486,6 @@
"description": {
"type": "string"
},
"groupId": {
"type": "string"
},
"id": {
"type": "string"
},
@ -1726,26 +1508,6 @@
}
}
},
"types.UserCreate": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"groupID": {
"type": "string"
},
"isSuperuser": {
"type": "boolean"
},
"name": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"types.UserIn": {
"type": "object",
"properties": {

View file

@ -493,8 +493,6 @@ definitions:
type: string
description:
type: string
groupId:
type: string
id:
type: string
itemCount:
@ -517,8 +515,6 @@ definitions:
type: string
description:
type: string
groupId:
type: string
id:
type: string
items:
@ -536,8 +532,6 @@ definitions:
type: string
description:
type: string
groupId:
type: string
id:
type: string
name:
@ -552,19 +546,6 @@ definitions:
token:
type: string
type: object
types.UserCreate:
properties:
email:
type: string
groupID:
type: string
isSuperuser:
type: boolean
name:
type: string
password:
type: string
type: object
types.UserIn:
properties:
email:
@ -616,124 +597,6 @@ paths:
summary: Retrieves the basic information about the API
tags:
- Base
/v1/admin/users:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/server.Result'
- properties:
item:
items:
$ref: '#/definitions/ent.User'
type: array
type: object
security:
- Bearer: []
summary: Gets all users from the database
tags:
- 'Admin: Users'
post:
parameters:
- description: User Data
in: body
name: payload
required: true
schema:
$ref: '#/definitions/types.UserCreate'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/server.Result'
- properties:
item:
$ref: '#/definitions/ent.User'
type: object
security:
- Bearer: []
summary: Create a new user
tags:
- 'Admin: Users'
/v1/admin/users/{id}:
delete:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"204":
description: ""
security:
- Bearer: []
summary: Delete a User
tags:
- 'Admin: Users'
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/server.Result'
- properties:
item:
$ref: '#/definitions/ent.User'
type: object
security:
- Bearer: []
summary: Get a user from the database
tags:
- 'Admin: Users'
put:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: User Data
in: body
name: payload
required: true
schema:
$ref: '#/definitions/types.UserUpdate'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/server.Result'
- properties:
item:
$ref: '#/definitions/ent.User'
type: object
security:
- Bearer: []
summary: Update a User
tags:
- 'Admin: Users'
/v1/items:
get:
produces: