swag generation fix
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type JSONRawMessage json.RawMessage
|
||||||
|
|
||||||
type CloudEventReceived struct {
|
type CloudEventReceived struct {
|
||||||
CloudEvent struct {
|
CloudEvent struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
@@ -53,7 +55,7 @@ type CloudEventReceived struct {
|
|||||||
Value string `json:"Value"`
|
Value string `json:"Value"`
|
||||||
} `json:"Vm"`
|
} `json:"Vm"`
|
||||||
} `json:"Vm"`
|
} `json:"Vm"`
|
||||||
ConfigSpec *json.RawMessage `json:"configSpec"`
|
ConfigSpec *JSONRawMessage `json:"configSpec" swaggertype:"object"`
|
||||||
ConfigChanges *ConfigChangesReceived `json:"configChanges"` // Modified to separate struct
|
ConfigChanges *ConfigChangesReceived `json:"configChanges"` // Modified to separate struct
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
} `json:"cloudEvent"`
|
} `json:"cloudEvent"`
|
||||||
|
|||||||
@@ -665,7 +665,156 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"models.CloudEventReceived": {
|
"models.CloudEventReceived": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"cloudEvent": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ChainId": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"ChangeTag": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"ComputeResource": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ComputeResource": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CreatedTime": {
|
||||||
|
"description": "Modified from time.Time",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Datacenter": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Datacenter": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Ds": {},
|
||||||
|
"Dvs": {},
|
||||||
|
"FullFormattedMessage": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Host": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Host": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Key": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"Net": {},
|
||||||
|
"NewParent": {
|
||||||
|
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||||
|
},
|
||||||
|
"OldParent": {
|
||||||
|
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||||
|
},
|
||||||
|
"SrcTemplate": {
|
||||||
|
"$ref": "#/definitions/models.CloudEventVm"
|
||||||
|
},
|
||||||
|
"Template": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"UserName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Vm": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Vm": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"configChanges": {
|
||||||
|
"description": "Modified to separate struct",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.ConfigChangesReceived"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"configSpec": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"specversion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"description": "Modified from time.Time",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"models.CloudEventResourcePool": {
|
"models.CloudEventResourcePool": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -705,6 +854,14 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"models.ConfigChangesReceived": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"modified": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"models.ImportReceived": {
|
"models.ImportReceived": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -654,7 +654,156 @@
|
|||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
"models.CloudEventReceived": {
|
"models.CloudEventReceived": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"cloudEvent": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ChainId": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"ChangeTag": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"ComputeResource": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ComputeResource": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"CreatedTime": {
|
||||||
|
"description": "Modified from time.Time",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Datacenter": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Datacenter": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Ds": {},
|
||||||
|
"Dvs": {},
|
||||||
|
"FullFormattedMessage": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Host": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Host": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Key": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"Net": {},
|
||||||
|
"NewParent": {
|
||||||
|
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||||
|
},
|
||||||
|
"OldParent": {
|
||||||
|
"$ref": "#/definitions/models.CloudEventResourcePool"
|
||||||
|
},
|
||||||
|
"SrcTemplate": {
|
||||||
|
"$ref": "#/definitions/models.CloudEventVm"
|
||||||
|
},
|
||||||
|
"Template": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"UserName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Vm": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Vm": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"Type": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"Value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"configChanges": {
|
||||||
|
"description": "Modified to separate struct",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/models.ConfigChangesReceived"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"configSpec": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"specversion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"description": "Modified from time.Time",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"models.CloudEventResourcePool": {
|
"models.CloudEventResourcePool": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -694,6 +843,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"models.ConfigChangesReceived": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"modified": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"models.ImportReceived": {
|
"models.ImportReceived": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -1,5 +1,101 @@
|
|||||||
definitions:
|
definitions:
|
||||||
models.CloudEventReceived:
|
models.CloudEventReceived:
|
||||||
|
properties:
|
||||||
|
cloudEvent:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
properties:
|
||||||
|
ChainId:
|
||||||
|
type: integer
|
||||||
|
ChangeTag:
|
||||||
|
type: string
|
||||||
|
ComputeResource:
|
||||||
|
properties:
|
||||||
|
ComputeResource:
|
||||||
|
properties:
|
||||||
|
Type:
|
||||||
|
type: string
|
||||||
|
Value:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
CreatedTime:
|
||||||
|
description: Modified from time.Time
|
||||||
|
type: string
|
||||||
|
Datacenter:
|
||||||
|
properties:
|
||||||
|
Datacenter:
|
||||||
|
properties:
|
||||||
|
Type:
|
||||||
|
type: string
|
||||||
|
Value:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Ds: {}
|
||||||
|
Dvs: {}
|
||||||
|
FullFormattedMessage:
|
||||||
|
type: string
|
||||||
|
Host:
|
||||||
|
properties:
|
||||||
|
Host:
|
||||||
|
properties:
|
||||||
|
Type:
|
||||||
|
type: string
|
||||||
|
Value:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Key:
|
||||||
|
type: integer
|
||||||
|
Net: {}
|
||||||
|
NewParent:
|
||||||
|
$ref: '#/definitions/models.CloudEventResourcePool'
|
||||||
|
OldParent:
|
||||||
|
$ref: '#/definitions/models.CloudEventResourcePool'
|
||||||
|
SrcTemplate:
|
||||||
|
$ref: '#/definitions/models.CloudEventVm'
|
||||||
|
Template:
|
||||||
|
type: boolean
|
||||||
|
UserName:
|
||||||
|
type: string
|
||||||
|
Vm:
|
||||||
|
properties:
|
||||||
|
Name:
|
||||||
|
type: string
|
||||||
|
Vm:
|
||||||
|
properties:
|
||||||
|
Type:
|
||||||
|
type: string
|
||||||
|
Value:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
configChanges:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/models.ConfigChangesReceived'
|
||||||
|
description: Modified to separate struct
|
||||||
|
configSpec:
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
source:
|
||||||
|
type: string
|
||||||
|
specversion:
|
||||||
|
type: string
|
||||||
|
time:
|
||||||
|
description: Modified from time.Time
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
type: object
|
type: object
|
||||||
models.CloudEventResourcePool:
|
models.CloudEventResourcePool:
|
||||||
properties:
|
properties:
|
||||||
@@ -25,6 +121,11 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
models.ConfigChangesReceived:
|
||||||
|
properties:
|
||||||
|
modified:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
models.ImportReceived:
|
models.ImportReceived:
|
||||||
properties:
|
properties:
|
||||||
Cluster:
|
Cluster:
|
||||||
|
|||||||
Reference in New Issue
Block a user