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