mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 06:02:25 -05:00
⚡ Improve descriptions
This commit is contained in:
parent
e37148b6e6
commit
1c53ac9f85
3 changed files with 23 additions and 6 deletions
|
|
@ -4,7 +4,6 @@
|
|||
"codexVersion": "1.0",
|
||||
"categories": [
|
||||
"Development",
|
||||
"HTTP Request & Response Service",
|
||||
"Developer Tools"
|
||||
],
|
||||
"resources": {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,13 @@ export class HttpBin implements INodeType {
|
|||
/**
|
||||
* In the properties array we have two mandatory options objects required
|
||||
*
|
||||
* Resource & Operation
|
||||
* [Resource & Operation]
|
||||
*
|
||||
*
|
||||
* https://docs.n8n.io/integrations/creating-nodes/code/create-first-node/#resources-and-operations
|
||||
*
|
||||
* In our example, the operations are separated into their own file (HTTPVerbDescription)
|
||||
* to keep this class easy to read
|
||||
*
|
||||
*/
|
||||
properties: [
|
||||
|
|
@ -54,6 +60,7 @@ export class HttpBin implements INodeType {
|
|||
],
|
||||
default: "httpverbs",
|
||||
},
|
||||
|
||||
...httpVerbOperations,
|
||||
...httpVerbFields,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { INodeProperties } from "n8n-workflow";
|
||||
|
||||
/**
|
||||
* This maps the operations to when the resource HTTP Verbs is selected
|
||||
* This maps the operations to when the Resource option HTTP Verbs is selected
|
||||
*/
|
||||
export const httpVerbOperations: Array<INodeProperties> = [
|
||||
{
|
||||
|
|
@ -40,12 +40,17 @@ export const httpVerbOperations: Array<INodeProperties> = [
|
|||
},
|
||||
];
|
||||
|
||||
/**
|
||||
*
|
||||
* Here we define what to show when the GET Operation is selected
|
||||
*
|
||||
* We do that by adding operation: ["get"], to "displayOptions.show"
|
||||
*/
|
||||
const getOperation: Array<INodeProperties> = [
|
||||
{
|
||||
name: "typeofData",
|
||||
default: "queryParameterOption",
|
||||
description:
|
||||
"Select type of data to send [Query Parameter Arguments, JSON-Body]",
|
||||
description: "Select type of data to send [Query Parameters]",
|
||||
displayName: "Type of Data",
|
||||
displayOptions: {
|
||||
show: {
|
||||
|
|
@ -110,12 +115,18 @@ const getOperation: Array<INodeProperties> = [
|
|||
},
|
||||
];
|
||||
|
||||
/**
|
||||
*
|
||||
* Here we define what to show when the DELETE Operation is selected
|
||||
*
|
||||
* We do that by adding operation: ["delete"], to "displayOptions.show"
|
||||
*/
|
||||
const deleteOperation: Array<INodeProperties> = [
|
||||
{
|
||||
name: "typeofData",
|
||||
default: "queryParameterOption",
|
||||
description:
|
||||
"Select type of data to send [Query Parameter Arguments, Form-Data, Body, JSON]",
|
||||
"Select type of data to send [Query Parameter Arguments, JSON-Body]",
|
||||
displayName: "Type of Data",
|
||||
displayOptions: {
|
||||
show: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue