3
0

upd(crm): define params as JSON

This commit is contained in:
Tit Petric
2018-09-02 22:36:02 +02:00
parent 0a8a33f1db
commit 72bbe50788
3 changed files with 16 additions and 18 deletions

View File

@@ -63,7 +63,7 @@ CRM module definitions
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
| name | string | POST | Module Name | N/A | YES |
| fields | string | POST | Fields JSON | N/A | YES |
| fields | types.JSONText | POST | Fields JSON | N/A | YES |
## Read module
@@ -93,7 +93,7 @@ CRM module definitions
| --------- | ---- | ------ | ----------- | ------- | --------- |
| id | uint64 | PATH | Module ID | N/A | YES |
| name | string | POST | Module Name | N/A | YES |
| fields | string | POST | Fields JSON | N/A | YES |
| fields | types.JSONText | POST | Fields JSON | N/A | YES |
## Delete module
@@ -136,7 +136,7 @@ CRM module definitions
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
| module | uint64 | PATH | Module ID | N/A | YES |
| payload | string | POST | Content JSON | N/A | YES |
| fields | types.JSONText | POST | Content JSON | N/A | YES |
## Read contents by ID from module section
@@ -167,7 +167,7 @@ CRM module definitions
| --------- | ---- | ------ | ----------- | ------- | --------- |
| module | uint64 | PATH | Module ID | N/A | YES |
| id | uint64 | PATH | Content ID | N/A | YES |
| payload | string | POST | Content JSON | N/A | YES |
| fields | types.JSONText | POST | Content JSON | N/A | YES |
## Delete content row from module section

View File

@@ -52,7 +52,7 @@
"fields": [
{ "name": "ID", "type": "uint64" },
{ "name": "Name", "type": "string" },
{ "name": "Fields", "type": "types.JSONText", "json": "fields", "db": "json", "complex": true }
{ "name": "Fields", "type": "types.JSONText", "json": "fields", "db": "json" }
]
},
{
@@ -73,7 +73,7 @@
"fields": [
{ "name": "ID", "type": "uint64" },
{ "name": "ModuleID", "type": "uint64" },
{ "name": "Fields", "type": "types.JSONText", "db": "json", "complex": true }
{ "name": "Fields", "type": "types.JSONText", "db": "json" }
]
}
],
@@ -97,7 +97,7 @@
"parameters": {
"post": [
{ "type": "string", "name": "name", "required": true, "title": "Module Name" },
{ "type": "string", "name": "fields", "required": true, "title": "Fields JSON" }
{ "type": "types.JSONText", "name": "fields", "required": true, "title": "Fields JSON" }
]
}
},
@@ -123,7 +123,7 @@
],
"post": [
{ "type": "string", "name": "name", "required": true, "title": "Module Name" },
{ "type": "string", "name": "fields", "required": true, "title": "Fields JSON" }
{ "type": "types.JSONText", "name": "fields", "required": true, "title": "Fields JSON" }
]
}
},
@@ -159,7 +159,7 @@
{ "type": "uint64", "name": "module", "required": true, "title": "Module ID" }
],
"post": [
{ "type": "string", "name": "payload", "required": true, "title": "Content JSON" }
{ "type": "types.JSONText", "name": "fields", "required": true, "title": "Content JSON" }
]
}
},
@@ -186,7 +186,7 @@
{ "type": "uint64", "name": "id", "required": true, "title": "Content ID" }
],
"post": [
{ "type": "string", "name": "payload", "required": true, "title": "Content JSON" }
{ "type": "types.JSONText", "name": "fields", "required": true, "title": "Content JSON" }
]
}
},

View File

@@ -15,7 +15,6 @@
"type": "string"
},
{
"complex": true,
"db": "json",
"json": "fields",
"name": "Fields",
@@ -63,7 +62,6 @@
"type": "uint64"
},
{
"complex": true,
"db": "json",
"name": "Fields",
"type": "types.JSONText"
@@ -113,7 +111,7 @@
"name": "fields",
"required": true,
"title": "Fields JSON",
"type": "string"
"type": "types.JSONText"
}
]
}
@@ -159,7 +157,7 @@
"name": "fields",
"required": true,
"title": "Fields JSON",
"type": "string"
"type": "types.JSONText"
}
]
}
@@ -212,10 +210,10 @@
],
"post": [
{
"name": "payload",
"name": "fields",
"required": true,
"title": "Content JSON",
"type": "string"
"type": "types.JSONText"
}
]
}
@@ -264,10 +262,10 @@
],
"post": [
{
"name": "payload",
"name": "fields",
"required": true,
"title": "Content JSON",
"type": "string"
"type": "types.JSONText"
}
]
}