Added sample requests to field name actions

This commit is contained in:
Austin Siew 2022-08-16 19:30:36 -06:00
parent ebdca1db6b
commit cb52e14497

View File

@ -2109,7 +2109,9 @@ corresponding to when the API was available for use.
"action": "modelFieldRename", "action": "modelFieldRename",
"version": 6, "version": 6,
"params": { "params": {
} "modelName": "Basic",
"oldFieldName": "Front",
"newFieldName": "FrontRenamed"
} }
} }
``` ```
@ -2132,7 +2134,9 @@ corresponding to when the API was available for use.
"action": "modelFieldReposition", "action": "modelFieldReposition",
"version": 6, "version": 6,
"params": { "params": {
} "modelName": "Basic",
"fieldName": "Front",
"index": 1
} }
} }
``` ```
@ -2148,6 +2152,7 @@ corresponding to when the API was available for use.
* **modelFieldAdd** * **modelFieldAdd**
TODO TODO
(optional index, defaults to adding the field to the very end of the list)
*Sample Request*: *Sample Request*:
```json ```json
@ -2155,7 +2160,8 @@ corresponding to when the API was available for use.
"action": "modelFieldAdd", "action": "modelFieldAdd",
"version": 6, "version": 6,
"params": { "params": {
} "modelName": "Basic",
"fieldName": "NewField"
} }
} }
``` ```
@ -2178,7 +2184,8 @@ corresponding to when the API was available for use.
"action": "modelFieldRemove", "action": "modelFieldRemove",
"version": 6, "version": 6,
"params": { "params": {
} "modelName": "Basic",
"fieldName": "Front"
} }
} }
``` ```
@ -2194,6 +2201,7 @@ corresponding to when the API was available for use.
* **editFieldNames** * **editFieldNames**
TODO TODO
Bulk version of the above 4 actions.
*Sample Request*: *Sample Request*:
```json ```json
@ -2201,7 +2209,28 @@ corresponding to when the API was available for use.
"action": "editFieldNames", "action": "editFieldNames",
"version": 6, "version": 6,
"params": { "params": {
"modelName": "Basic",
"actions": [
{
"action": "add",
"fieldName": "field3",
"index": 0
},
{
"action": "reposition",
"fieldName": "field3",
"index": 2
},
{
"action": "rename",
"oldFieldName": "field3",
"newFieldName": "renamed_field3"
},
{
"action": "remove",
"fieldName": "field3"
} }
]
} }
} }
``` ```