mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-03 16:20:27 +00:00
fix type generator
This commit is contained in:
parent
c46d691297
commit
9ddce9e28d
6 changed files with 51 additions and 62 deletions
|
@ -20,7 +20,7 @@ tasks:
|
||||||
- db:generate
|
- db:generate
|
||||||
cmds:
|
cmds:
|
||||||
- cd backend/app/api/static && swag fmt --dir=../
|
- cd backend/app/api/static && swag fmt --dir=../
|
||||||
- cd backend/app/api/static && swag init --dir=../,../../../internal,../../../pkgs --parseDependency
|
- cd backend/app/api/static && swag init --dir=../,../../../internal,../../../pkgs
|
||||||
- |
|
- |
|
||||||
npx swagger-typescript-api \
|
npx swagger-typescript-api \
|
||||||
--no-client \
|
--no-client \
|
||||||
|
@ -139,4 +139,4 @@ tasks:
|
||||||
- task: go:all
|
- task: go:all
|
||||||
- task: ui:check
|
- task: ui:check
|
||||||
- task: ui:fix
|
- task: ui:fix
|
||||||
- task: test:ci
|
- task: test:ci
|
||||||
|
|
|
@ -731,7 +731,7 @@ const docTemplate = `{
|
||||||
"422": {
|
"422": {
|
||||||
"description": "Unprocessable Entity",
|
"description": "Unprocessable Entity",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/mid.ErrorResponse"
|
"$ref": "#/definitions/validate.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1799,20 +1799,6 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"mid.ErrorResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"error": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"fields": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repo.DocumentOut": {
|
"repo.DocumentOut": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -2853,6 +2839,17 @@ const docTemplate = `{
|
||||||
"properties": {
|
"properties": {
|
||||||
"item": {}
|
"item": {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"validate.ErrorResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"fields": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securityDefinitions": {
|
"securityDefinitions": {
|
||||||
|
|
|
@ -723,7 +723,7 @@
|
||||||
"422": {
|
"422": {
|
||||||
"description": "Unprocessable Entity",
|
"description": "Unprocessable Entity",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/mid.ErrorResponse"
|
"$ref": "#/definitions/validate.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1791,20 +1791,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"mid.ErrorResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"error": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"fields": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repo.DocumentOut": {
|
"repo.DocumentOut": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -2845,6 +2831,17 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"item": {}
|
"item": {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"validate.ErrorResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"fields": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securityDefinitions": {
|
"securityDefinitions": {
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
basePath: /api
|
basePath: /api
|
||||||
definitions:
|
definitions:
|
||||||
mid.ErrorResponse:
|
|
||||||
properties:
|
|
||||||
error:
|
|
||||||
type: string
|
|
||||||
fields:
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: object
|
|
||||||
repo.DocumentOut:
|
repo.DocumentOut:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
@ -707,6 +698,13 @@ definitions:
|
||||||
properties:
|
properties:
|
||||||
item: {}
|
item: {}
|
||||||
type: object
|
type: object
|
||||||
|
validate.ErrorResponse:
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
fields:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
info:
|
info:
|
||||||
contact:
|
contact:
|
||||||
name: Don't
|
name: Don't
|
||||||
|
@ -1084,7 +1082,7 @@ paths:
|
||||||
"422":
|
"422":
|
||||||
description: Unprocessable Entity
|
description: Unprocessable Entity
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/mid.ErrorResponse'
|
$ref: '#/definitions/validate.ErrorResponse'
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: Create Item Attachment
|
summary: Create Item Attachment
|
||||||
|
|
|
@ -723,7 +723,7 @@
|
||||||
"422": {
|
"422": {
|
||||||
"description": "Unprocessable Entity",
|
"description": "Unprocessable Entity",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/mid.ErrorResponse"
|
"$ref": "#/definitions/validate.ErrorResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1791,20 +1791,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"mid.ErrorResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"error": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"fields": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"repo.DocumentOut": {
|
"repo.DocumentOut": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -2845,6 +2831,17 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"item": {}
|
"item": {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"validate.ErrorResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"fields": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"securityDefinitions": {
|
"securityDefinitions": {
|
||||||
|
|
|
@ -10,11 +10,6 @@
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface MidErrorResponse {
|
|
||||||
error: string;
|
|
||||||
fields: Record<string, string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DocumentOut {
|
export interface DocumentOut {
|
||||||
id: string;
|
id: string;
|
||||||
path: string;
|
path: string;
|
||||||
|
@ -432,3 +427,8 @@ export interface TokenResponse {
|
||||||
export interface Wrapped {
|
export interface Wrapped {
|
||||||
item: any;
|
item: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ValidateErrorResponse {
|
||||||
|
error: string;
|
||||||
|
fields: string;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue