mirror of
https://github.com/n8n-io/n8n-nodes-starter.git
synced 2025-10-28 14:12:24 -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",
|
"codexVersion": "1.0",
|
||||||
"categories": [
|
"categories": [
|
||||||
"Development",
|
"Development",
|
||||||
"HTTP Request & Response Service",
|
|
||||||
"Developer Tools"
|
"Developer Tools"
|
||||||
],
|
],
|
||||||
"resources": {
|
"resources": {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,13 @@ export class HttpBin implements INodeType {
|
||||||
/**
|
/**
|
||||||
* In the properties array we have two mandatory options objects required
|
* 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: [
|
properties: [
|
||||||
|
|
@ -54,6 +60,7 @@ export class HttpBin implements INodeType {
|
||||||
],
|
],
|
||||||
default: "httpverbs",
|
default: "httpverbs",
|
||||||
},
|
},
|
||||||
|
|
||||||
...httpVerbOperations,
|
...httpVerbOperations,
|
||||||
...httpVerbFields,
|
...httpVerbFields,
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { INodeProperties } from "n8n-workflow";
|
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> = [
|
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> = [
|
const getOperation: Array<INodeProperties> = [
|
||||||
{
|
{
|
||||||
name: "typeofData",
|
name: "typeofData",
|
||||||
default: "queryParameterOption",
|
default: "queryParameterOption",
|
||||||
description:
|
description: "Select type of data to send [Query Parameters]",
|
||||||
"Select type of data to send [Query Parameter Arguments, JSON-Body]",
|
|
||||||
displayName: "Type of Data",
|
displayName: "Type of Data",
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
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> = [
|
const deleteOperation: Array<INodeProperties> = [
|
||||||
{
|
{
|
||||||
name: "typeofData",
|
name: "typeofData",
|
||||||
default: "queryParameterOption",
|
default: "queryParameterOption",
|
||||||
description:
|
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",
|
displayName: "Type of Data",
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue