Browse Source

refactor(nocodb): revise form model & example in swagger.json

pull/5222/head
Wing-Kam Wong 2 years ago
parent
commit
0d86ba8fc0
  1. 295
      packages/nocodb/src/schema/swagger.json

295
packages/nocodb/src/schema/swagger.json

@ -8893,97 +8893,215 @@
"description": "Model for Form", "description": "Model for Form",
"examples": [ "examples": [
{ {
"banner_image_url": "string", "base_id": "ds_g4ccx6e77h1dmi",
"banner_image_url": null,
"columns": [ "columns": [
{ {
"created_at": "string", "id": "fvc_ugj9zo5bzocxtl",
"description": "string", "base_id": "ds_g4ccx6e77h1dmi",
"fk_column_id": "string", "project_id": "p_xm3thidrblw4n7",
"fk_view_id": "string", "fk_view_id": "vw_kdf5cr7qmhksek",
"fk_column_id": "cl_phvuuwjrzcdo0g",
"uuid": null,
"label": null,
"help": null, "help": null,
"id": "string", "description": null,
"label": "string", "required": null,
"meta": {}, "show": 0,
"order": 0, "order": 1,
"required": true, "created_at": "2023-03-04 16:40:47",
"show": true, "updated_at": "2023-03-04 16:40:47",
"updated_at": "string", "meta": {}
"uuid": null
} }
], ],
"email": "string", "email": "user@example.com",
"fk_model_id": "string", "fk_model_id": "md_rsu68aqjsbyqtl",
"heading": "string", "heading": "My Form",
"id": "string",
"lock_type": "collaborative", "lock_type": "collaborative",
"logo_url": "string", "logo_url": null,
"meta": {}, "meta": null,
"redirect_after_secs": "string", "redirect_after_secs": null,
"redirect_url": "string", "redirect_url": null,
"show_blank_form": true, "show_blank_form": 0,
"subheading": "string", "subheading": "My Form Subheading",
"submit_another_form": true, "submit_another_form": 0,
"success_msg": "string", "success_msg": "Thank you for the submission.",
"title": "string" "title": "Form View 1"
} }
], ],
"title": "Form Model",
"type": "object",
"properties": { "properties": {
"id": {
"$ref": "#/components/schemas/Id",
"description": "Unique ID",
"x-stoplight": {
"id": "z6wjvs00d3qfk"
}
},
"banner_image_url": { "banner_image_url": {
"$ref": "#/components/schemas/StringOrNull" "$ref": "#/components/schemas/StringOrNull",
"description": "Banner Image URL. Not in use currently."
}, },
"columns": { "columns": {
"type": "array",
"description": "Form Columns",
"items": { "items": {
"$ref": "#/components/schemas/FormColumn" "$ref": "#/components/schemas/FormColumn"
}, }
"type": "array"
}, },
"email": { "email": {
"$ref": "#/components/schemas/StringOrNull" "$ref": "#/components/schemas/StringOrNull",
"description": "Email to sned after form is submitted"
}, },
"fk_model_id": { "fk_model_id": {
"type": "string" "type": "string",
"description": "Foreign Key to Model",
"example": "md_rsu68aqjsbyqtl"
}, },
"heading": { "base_id": {
"type": "string" "type": "string",
"description": "Base I",
"example": "md_rsu68aqjsbyqtl",
"x-stoplight": {
"id": "kfz7tve8nzj6f"
}
}, },
"id": { "heading": {
"$ref": "#/components/schemas/Id", "type": "string",
"description": "Unique ID" "description": "The heading of the form",
"example": "My Form"
}, },
"lock_type": { "lock_type": {
"enum": ["collaborative", "locked", "personal"], "enum": ["collaborative", "locked", "personal"],
"type": "string",
"description": "Lock Type of this view",
"example": "collaborative"
},
"logo_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Logo URL. Not in use currently."
},
"meta": {
"$ref": "#/components/schemas/Meta",
"description": "Meta Info for this view"
},
"redirect_after_secs": {
"$ref": "#/components/schemas/StringOrNull",
"description": "The numbers of seconds to redirect after form submission"
},
"redirect_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "URL to redirect after submission"
},
"show_blank_form": {
"$ref": "#/components/schemas/Bool",
"description": "Show `Blank Form` after 5 seconds"
},
"subheading": {
"type": "string",
"description": "The subheading of the form",
"example": "My Form Subheading"
},
"submit_another_form": {
"$ref": "#/components/schemas/Bool",
"description": "Show `Submit Another Form` button"
},
"success_msg": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom message after the form is successfully submitted"
},
"title": {
"type": "string",
"description": "Form View Title",
"example": "Form View 1"
}
}
},
"FormReq": {
"description": "Model for Form Request",
"examples": [
{
"banner_image_url": null,
"email": "user@example.com",
"heading": "My Form",
"lock_type": "collaborative",
"logo_url": null,
"meta": null,
"redirect_after_secs": null,
"redirect_url": null,
"show_blank_form": 0,
"subheading": "My Form Subheading",
"submit_another_form": 0,
"success_msg": "Thank you for the submission.",
"title": "Form View 1"
}
],
"title": "Form Request Model",
"type": "object",
"properties": {
"banner_image_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Banner Image URL. Not in use currently."
},
"email": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Email to sned after form is submitted"
},
"heading": {
"description": "The heading of the form",
"example": "My Form",
"maxLength": 255,
"type": "string" "type": "string"
}, },
"lock_type": {
"enum": ["collaborative", "locked", "personal"],
"type": "string",
"description": "Lock Type of this view",
"example": "collaborative"
},
"logo_url": { "logo_url": {
"$ref": "#/components/schemas/StringOrNull" "$ref": "#/components/schemas/StringOrNull",
"description": "Logo URL. Not in use currently."
}, },
"meta": { "meta": {
"$ref": "#/components/schemas/Meta" "$ref": "#/components/schemas/Meta",
"description": "Meta Info for this view"
}, },
"redirect_after_secs": { "redirect_after_secs": {
"$ref": "#/components/schemas/StringOrNull" "$ref": "#/components/schemas/StringOrNull",
"description": "The numbers of seconds to redirect after form submission"
}, },
"redirect_url": { "redirect_url": {
"$ref": "#/components/schemas/StringOrNull" "$ref": "#/components/schemas/StringOrNull",
"description": "URL to redirect after submission"
}, },
"show_blank_form": { "show_blank_form": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Show `Blank Form` after 5 seconds"
}, },
"subheading": { "subheading": {
"description": "The subheading of the form",
"example": "My Form Subheading",
"maxLength": 255,
"type": "string" "type": "string"
}, },
"submit_another_form": { "submit_another_form": {
"$ref": "#/components/schemas/Bool" "$ref": "#/components/schemas/Bool",
"description": "Show `Submit Another Form` button"
}, },
"success_msg": { "success_msg": {
"type": "string" "$ref": "#/components/schemas/StringOrNull",
"description": "Custom message after the form is successfully submitted"
}, },
"title": { "title": {
"description": "The title of the form",
"example": "My Form",
"maxLength": 255,
"minLength": 1,
"type": "string" "type": "string"
} }
}, }
"title": "Form Model",
"type": "object"
}, },
"FormColumn": { "FormColumn": {
"description": "Model for Form Column", "description": "Model for Form Column",
@ -9134,9 +9252,6 @@
"allOf": [ "allOf": [
{ {
"$ref": "#/components/schemas/FormReq" "$ref": "#/components/schemas/FormReq"
},
{
"required": ["title"]
} }
], ],
"description": "Model for Form Create", "description": "Model for Form Create",
@ -9159,88 +9274,6 @@
], ],
"title": "Form Create Model" "title": "Form Create Model"
}, },
"FormReq": {
"description": "Model for Form Request",
"examples": [
{
"banner_image_url": "string",
"email": "string",
"heading": "My Form",
"lock_type": "collaborative",
"logo_url": "string",
"meta": {},
"redirect_after_secs": "string",
"redirect_url": "string",
"show_blank_form": true,
"subheading": "My Form Subheading",
"submit_another_form": true,
"success_msg": "string",
"title": "My Form"
}
],
"properties": {
"banner_image_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Banner Image URL. Not in use currently."
},
"email": {
"$ref": "#/components/schemas/StringOrNull"
},
"heading": {
"description": "The heading of the form",
"example": "My Form",
"maxLength": 255,
"type": "string"
},
"lock_type": {
"enum": ["collaborative", "locked", "personal"],
"type": "string"
},
"logo_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Logo URL. Not in use currently."
},
"meta": {
"$ref": "#/components/schemas/Meta",
"description": "Meta Info for this view"
},
"redirect_after_secs": {
"$ref": "#/components/schemas/StringOrNull",
"description": "The numbers of seconds to redirect after form submission"
},
"redirect_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "URL to redirect after submission"
},
"show_blank_form": {
"$ref": "#/components/schemas/Bool",
"description": "Show `Blank Form` after 5 seconds"
},
"subheading": {
"description": "The subheading of the form",
"example": "My Form Subheading",
"maxLength": 255,
"type": "string"
},
"submit_another_form": {
"$ref": "#/components/schemas/Bool",
"description": "Show `Submit Another Form` button"
},
"success_msg": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom message after the form is successfully submitted"
},
"title": {
"description": "The title of the form",
"example": "My Form",
"maxLength": 255,
"minLength": 1,
"type": "string"
}
},
"title": "Form Request Model",
"type": "object"
},
"Formula": { "Formula": {
"description": "Model for Formula", "description": "Model for Formula",
"examples": [ "examples": [

Loading…
Cancel
Save