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
|
||||
cmds:
|
||||
- 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 \
|
||||
--no-client \
|
||||
|
@ -139,4 +139,4 @@ tasks:
|
|||
- task: go:all
|
||||
- task: ui:check
|
||||
- task: ui:fix
|
||||
- task: test:ci
|
||||
- task: test:ci
|
||||
|
|
|
@ -731,7 +731,7 @@ const docTemplate = `{
|
|||
"422": {
|
||||
"description": "Unprocessable Entity",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/mid.ErrorResponse"
|
||||
"$ref": "#/definitions/validate.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1799,20 +1799,6 @@ const docTemplate = `{
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"mid.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"repo.DocumentOut": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -2853,6 +2839,17 @@ const docTemplate = `{
|
|||
"properties": {
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"validate.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
|
|
@ -723,7 +723,7 @@
|
|||
"422": {
|
||||
"description": "Unprocessable Entity",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/mid.ErrorResponse"
|
||||
"$ref": "#/definitions/validate.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1791,20 +1791,6 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"mid.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"repo.DocumentOut": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -2845,6 +2831,17 @@
|
|||
"properties": {
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"validate.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
basePath: /api
|
||||
definitions:
|
||||
mid.ErrorResponse:
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
fields:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
repo.DocumentOut:
|
||||
properties:
|
||||
id:
|
||||
|
@ -707,6 +698,13 @@ definitions:
|
|||
properties:
|
||||
item: {}
|
||||
type: object
|
||||
validate.ErrorResponse:
|
||||
properties:
|
||||
error:
|
||||
type: string
|
||||
fields:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact:
|
||||
name: Don't
|
||||
|
@ -1084,7 +1082,7 @@ paths:
|
|||
"422":
|
||||
description: Unprocessable Entity
|
||||
schema:
|
||||
$ref: '#/definitions/mid.ErrorResponse'
|
||||
$ref: '#/definitions/validate.ErrorResponse'
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Create Item Attachment
|
||||
|
|
|
@ -723,7 +723,7 @@
|
|||
"422": {
|
||||
"description": "Unprocessable Entity",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/mid.ErrorResponse"
|
||||
"$ref": "#/definitions/validate.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1791,20 +1791,6 @@
|
|||
}
|
||||
},
|
||||
"definitions": {
|
||||
"mid.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"repo.DocumentOut": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -2845,6 +2831,17 @@
|
|||
"properties": {
|
||||
"item": {}
|
||||
}
|
||||
},
|
||||
"validate.ErrorResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"fields": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
* ---------------------------------------------------------------
|
||||
*/
|
||||
|
||||
export interface MidErrorResponse {
|
||||
error: string;
|
||||
fields: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface DocumentOut {
|
||||
id: string;
|
||||
path: string;
|
||||
|
@ -432,3 +427,8 @@ export interface TokenResponse {
|
|||
export interface Wrapped {
|
||||
item: any;
|
||||
}
|
||||
|
||||
export interface ValidateErrorResponse {
|
||||
error: string;
|
||||
fields: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue