mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-05 17:10:30 +00:00
code gen
This commit is contained in:
parent
4859f5b711
commit
014bc65089
5 changed files with 121 additions and 31 deletions
|
@ -425,8 +425,8 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "OK",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/repo.ItemSummary"
|
"$ref": "#/definitions/repo.ItemSummary"
|
||||||
}
|
}
|
||||||
|
@ -864,8 +864,8 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "OK",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/repo.MaintenanceEntry"
|
"$ref": "#/definitions/repo.MaintenanceEntry"
|
||||||
}
|
}
|
||||||
|
@ -1902,9 +1902,15 @@ const docTemplate = `{
|
||||||
},
|
},
|
||||||
"repo.ItemCreate": {
|
"repo.ItemCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 1000,
|
||||||
|
"minLength": 1
|
||||||
},
|
},
|
||||||
"labelIds": {
|
"labelIds": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1917,7 +1923,9 @@ const docTemplate = `{
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"minLength": 1
|
||||||
},
|
},
|
||||||
"parentId": {
|
"parentId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -2208,15 +2216,21 @@ const docTemplate = `{
|
||||||
},
|
},
|
||||||
"repo.LabelCreate": {
|
"repo.LabelCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"color": {
|
"color": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"minLength": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2791,12 +2805,17 @@ const docTemplate = `{
|
||||||
},
|
},
|
||||||
"v1.GroupInvitationCreate": {
|
"v1.GroupInvitationCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"uses"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"expiresAt": {
|
"expiresAt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"uses": {
|
"uses": {
|
||||||
"type": "integer"
|
"type": "integer",
|
||||||
|
"maximum": 100,
|
||||||
|
"minimum": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -417,8 +417,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "OK",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/repo.ItemSummary"
|
"$ref": "#/definitions/repo.ItemSummary"
|
||||||
}
|
}
|
||||||
|
@ -856,8 +856,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "OK",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/repo.MaintenanceEntry"
|
"$ref": "#/definitions/repo.MaintenanceEntry"
|
||||||
}
|
}
|
||||||
|
@ -1894,9 +1894,15 @@
|
||||||
},
|
},
|
||||||
"repo.ItemCreate": {
|
"repo.ItemCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 1000,
|
||||||
|
"minLength": 1
|
||||||
},
|
},
|
||||||
"labelIds": {
|
"labelIds": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1909,7 +1915,9 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"minLength": 1
|
||||||
},
|
},
|
||||||
"parentId": {
|
"parentId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -2200,15 +2208,21 @@
|
||||||
},
|
},
|
||||||
"repo.LabelCreate": {
|
"repo.LabelCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"color": {
|
"color": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"minLength": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2783,12 +2797,17 @@
|
||||||
},
|
},
|
||||||
"v1.GroupInvitationCreate": {
|
"v1.GroupInvitationCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"uses"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"expiresAt": {
|
"expiresAt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"uses": {
|
"uses": {
|
||||||
"type": "integer"
|
"type": "integer",
|
||||||
|
"maximum": 100,
|
||||||
|
"minimum": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,6 +67,8 @@ definitions:
|
||||||
repo.ItemCreate:
|
repo.ItemCreate:
|
||||||
properties:
|
properties:
|
||||||
description:
|
description:
|
||||||
|
maxLength: 1000
|
||||||
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
labelIds:
|
labelIds:
|
||||||
items:
|
items:
|
||||||
|
@ -76,10 +78,15 @@ definitions:
|
||||||
description: Edges
|
description: Edges
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
|
maxLength: 255
|
||||||
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
parentId:
|
parentId:
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
required:
|
||||||
|
- description
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
repo.ItemField:
|
repo.ItemField:
|
||||||
properties:
|
properties:
|
||||||
|
@ -281,9 +288,14 @@ definitions:
|
||||||
color:
|
color:
|
||||||
type: string
|
type: string
|
||||||
description:
|
description:
|
||||||
|
maxLength: 255
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
|
maxLength: 255
|
||||||
|
minLength: 1
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
repo.LabelOut:
|
repo.LabelOut:
|
||||||
properties:
|
properties:
|
||||||
|
@ -666,7 +678,11 @@ definitions:
|
||||||
expiresAt:
|
expiresAt:
|
||||||
type: string
|
type: string
|
||||||
uses:
|
uses:
|
||||||
|
maximum: 100
|
||||||
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
|
required:
|
||||||
|
- uses
|
||||||
type: object
|
type: object
|
||||||
v1.ItemAttachmentToken:
|
v1.ItemAttachmentToken:
|
||||||
properties:
|
properties:
|
||||||
|
@ -932,8 +948,8 @@ paths:
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"201":
|
||||||
description: OK
|
description: Created
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/repo.ItemSummary'
|
$ref: '#/definitions/repo.ItemSummary'
|
||||||
security:
|
security:
|
||||||
|
@ -1140,8 +1156,8 @@ paths:
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"201":
|
||||||
description: OK
|
description: Created
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/repo.MaintenanceEntry'
|
$ref: '#/definitions/repo.MaintenanceEntry'
|
||||||
security:
|
security:
|
||||||
|
|
|
@ -417,8 +417,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "OK",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/repo.ItemSummary"
|
"$ref": "#/definitions/repo.ItemSummary"
|
||||||
}
|
}
|
||||||
|
@ -856,8 +856,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "OK",
|
"description": "Created",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/repo.MaintenanceEntry"
|
"$ref": "#/definitions/repo.MaintenanceEntry"
|
||||||
}
|
}
|
||||||
|
@ -1894,9 +1894,15 @@
|
||||||
},
|
},
|
||||||
"repo.ItemCreate": {
|
"repo.ItemCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"description",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 1000,
|
||||||
|
"minLength": 1
|
||||||
},
|
},
|
||||||
"labelIds": {
|
"labelIds": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
@ -1909,7 +1915,9 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"minLength": 1
|
||||||
},
|
},
|
||||||
"parentId": {
|
"parentId": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -2200,15 +2208,21 @@
|
||||||
},
|
},
|
||||||
"repo.LabelCreate": {
|
"repo.LabelCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"name"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"color": {
|
"color": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 255,
|
||||||
|
"minLength": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2783,12 +2797,17 @@
|
||||||
},
|
},
|
||||||
"v1.GroupInvitationCreate": {
|
"v1.GroupInvitationCreate": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"uses"
|
||||||
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"expiresAt": {
|
"expiresAt": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"uses": {
|
"uses": {
|
||||||
"type": "integer"
|
"type": "integer",
|
||||||
|
"maximum": 100,
|
||||||
|
"minimum": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -52,10 +52,18 @@ export interface ItemAttachmentUpdate {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ItemCreate {
|
export interface ItemCreate {
|
||||||
|
/**
|
||||||
|
* @minLength 1
|
||||||
|
* @maxLength 1000
|
||||||
|
*/
|
||||||
description: string;
|
description: string;
|
||||||
labelIds: string[];
|
labelIds: string[];
|
||||||
/** Edges */
|
/** Edges */
|
||||||
locationId: string;
|
locationId: string;
|
||||||
|
/**
|
||||||
|
* @minLength 1
|
||||||
|
* @maxLength 255
|
||||||
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
parentId: string | null;
|
parentId: string | null;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +172,12 @@ export interface ItemUpdate {
|
||||||
|
|
||||||
export interface LabelCreate {
|
export interface LabelCreate {
|
||||||
color: string;
|
color: string;
|
||||||
|
/** @maxLength 255 */
|
||||||
description: string;
|
description: string;
|
||||||
|
/**
|
||||||
|
* @minLength 1
|
||||||
|
* @maxLength 255
|
||||||
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,6 +415,10 @@ export interface GroupInvitation {
|
||||||
|
|
||||||
export interface GroupInvitationCreate {
|
export interface GroupInvitationCreate {
|
||||||
expiresAt: Date | string;
|
expiresAt: Date | string;
|
||||||
|
/**
|
||||||
|
* @min 1
|
||||||
|
* @max 100
|
||||||
|
*/
|
||||||
uses: number;
|
uses: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue