# Using NodeGenNode generates a large flow

**URL:** <https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865>\
**Category:** General\
**Created:** [27 January 2021 11:29 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865 "2021-01-27T11:29:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![crackytsi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crackytsi/32/28369_2.png) [@crackytsi](https://discourse.nodered.org/u/crackytsi)\
**Post date:** [27 January 2021 11:29 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865/1 "2021-01-27T11:29:36Z")

</div>

Hi,  
I generated from a swagger file a Node using NodeGen.  
When I use that flow, it contains a very large set, one for each rest-api calls and some related value.  
Is there any chance to shrink that data? I tried to remove all entries, the flow continues to work, but they get re-created. If I use multiple nodes of that size, it blows up the json file.

I'm not sure if this is related to NodeGen or to NodeRed.

Example (everything starting with postAhapi...)

```auto
{
        "id": "7f94b4a1.a54abc",
        "type": "AhapiEmail",
        "z": "d044536a.f72f",
        "service": "a2084bc4.eb4ff8",
        "postAhapiCaseByCaseidEmailexportByEmail_caseid": "",
        "postAhapiCaseByCaseidEmailexportByEmail_caseidType": "str",
        "postAhapiCaseByCaseidEmailexportByEmail_email": "",
        "postAhapiCaseByCaseidEmailexportByEmail_emailType": "str",
...}

```

---

<div class="post-metadata">

**Author:** ![crackytsi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crackytsi/32/28369_2.png) [@crackytsi](https://discourse.nodered.org/u/crackytsi)\
**Post date:** [28 January 2021 09:20 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865/2 "2021-01-28T09:20:56Z")

</div>

> [@crackytsi](#):
>
> large

Is this a Node-Red issue or a NodeGen issue?  
I would be even happy to just know if this is not related to NodeRed Core.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 January 2021 11:13 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865/3 "2021-01-28T11:13:42Z")

</div>

it'll be nodegen - it will create all the possible endpoints for you to use - so if the swagger doc is large - it will be large.

---

<div class="post-metadata">

**Author:** ![crackytsi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crackytsi/32/28369_2.png) [@crackytsi](https://discourse.nodered.org/u/crackytsi)\
**Post date:** [28 January 2021 11:34 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865/4 "2021-01-28T11:34:39Z")

</div>

> [@dceejay](#):
>
> ll create all the possible endpoints for you to use - so if the swagger doc is large - it will be large.

Thank you @dceejay Yes, that's what I was expecting. But if I use this nodegen generated node in node-red, for each endpoint there is an attribute (that is "" or "str"). In the selected node, I select one endpoint, but the others appear as attributes on node-level. I can't understand whats the reason for that.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 January 2021 12:09 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865/5 "2021-01-28T12:09:46Z")

</div>

Well yes. Would need to dig into the source to find out what is prompting that. ( probably both the source openapi and possibly the converter)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 March 2021 12:10 UTC](https://discourse.nodered.org/t/using-nodegennode-generates-a-large-flow/39865/6 "2021-03-29T12:10:38Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
