node-red / nrlint

Node-RED Flow Linter
Apache License 2.0
36 stars 15 forks source link

URL linter ignores HTTP method for duplicate check #26

Closed Stwissel closed 2 years ago

Stwissel commented 2 years ago

Current Behavior

I have a set of URL input nodes:

The linter flags those as duplicates

Expected Behavior

http input nodes for different http methods and the same url are common. Linter should take http method into consideration when checking for uniqueness

Steps To Reproduce

Create 2 http input nodes with the same URL but different http keywords

Example flow

[
    {
        "id": "27ed8060f03ddc26",
        "type": "http in",
        "z": "436e0a78d85f467e",
        "name": "",
        "url": "/test",
        "method": "get",
        "upload": false,
        "swaggerDoc": "",
        "x": 370,
        "y": 380,
        "wires": [
            [
                "489e1429db44a5ac"
            ]
        ]
    },
    {
        "id": "489e1429db44a5ac",
        "type": "http response",
        "z": "436e0a78d85f467e",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 570,
        "y": 420,
        "wires": []
    },
    {
        "id": "b13ce17ecd7defeb",
        "type": "http in",
        "z": "436e0a78d85f467e",
        "name": "",
        "url": "/test",
        "method": "post",
        "upload": false,
        "swaggerDoc": "",
        "x": 360,
        "y": 440,
        "wires": [
            [
                "489e1429db44a5ac"
            ]
        ]
    }
]

Environment

knolleary commented 2 years ago

Duplicate of #19

Already fixed in git, awaiting a release to make it available

Stwissel commented 2 years ago

Sorry - missed the issue #19 My apologies

Stwissel commented 2 years ago

Shall I open a separate ticket for the "unconnected http node" glitch when spread over 2 flows?