Improve descriptions

This commit is contained in:
brianinoa 2022-06-16 15:03:56 +02:00
commit 1c53ac9f85
3 changed files with 23 additions and 6 deletions

View file

@ -4,7 +4,6 @@
"codexVersion": "1.0",
"categories": [
"Development",
"HTTP Request & Response Service",
"Developer Tools"
],
"resources": {

View file

@ -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,
],

View file

@ -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: {