# \[ANNOUNCE\] openAPI-RED - yet another swagger-client node

**URL:** <https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545>\
**Category:** Share Your Nodes\
**Created:** [24 March 2020 08:05 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545 "2020-03-24T08:05:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 08:05 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/1 "2020-03-24T08:05:14Z")

</div>

Hello again,

having just announced kdbx-RED, here comes the next project fresh outr of our oven: openAPI-RED.

Why another kind of swagger-client node? Well the ones that existed just didn't work for us (seems newer APIs are not supported by them at the moment). So we made our own.

Try it and let us know what you think about it. Feedback is very welcome.

Take a look at it's [GitLab-page](https://gitlab.com/2WeltenChris/openapi-red) for more details.

Take care!

Chris

---

<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:** [24 March 2020 08:36 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/2 "2020-03-24T08:36:09Z")

</div>

Nice

if you are going to publish these to npm can you please look at our packaging (naming) guidelines before you do so please.... [https://nodered.org/docs/creating-nodes/packaging#Naming](https://nodered.org/docs/creating-nodes/packaging#Naming)

Thanks

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 08:42 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/3 "2020-03-24T08:42:43Z")

</div>

Actually I did. It says:

> Alternatively, any name that doesn’t use `node-red` as a prefix can be used.

I think that `node-red-contrib-` is quite a long prefix and makes the package names harder to read. That's why we decided to work with the postfix `-red` instead.

Is this a real issue? I asked that question in another thread before but didn't get an answer yet.

Please let me know if it is. If yes, it would be great if the guide gets updated though.

Thx for the feedback!

---

<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:** [24 March 2020 09:06 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/4 "2020-03-24T09:06:02Z")

</div>

In the scheme of things to worry about these days it's not top of the list.  
(though I see there is already [https://flows.nodered.org/node/@node-red-tools/node-red-contrib-openapi](https://flows.nodered.org/node/@node-red-tools/node-red-contrib-openapi) ☹ from just a couple of months ago - shame there was no collaboration to reduce confusion ... - ah well)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 March 2020 09:11 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/5 "2020-03-24T09:11:20Z")

</div>

I think most will not recognise it as a node-red node if it does not follow the usual convention. Certainly I would not recognise it as such and would assume it was a nodejs module not a node-red one.

---

<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:** [24 March 2020 09:24 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/6 "2020-03-24T09:24:10Z")

</div>

it's indexed in the flows site so should be ok.

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 09:24 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/7 "2020-03-24T09:24:32Z")

</div>

@dceejay That's definitely true. Yes! We try to do our best anyway. So if there is a good reason to change naming-schemes, we will consider that. And about the other node: We searched for existing solutions. Maybe we just overlooked it or started with our development just a few days before. Anyway, we will take a look at it now. Maybe we can join forces. 🙂

@Colin That's a valid point. And we didn't think of it. Anyway, I think as it is listed in the flow lib it should be ok. That's where we all search for nodes, don't we?

---

<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:** [24 March 2020 09:37 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/8 "2020-03-24T09:37:30Z")

</div>

Hmm - if I try a file served locally that loads fine in my browser - [http://localhost:1880/test.json](http://localhost:1880/test.json) - it gets a 404 error.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/85441a80e06f63d9ab49d014b96558baac4defd5.png)  
[http://localhost:1880/getNewOpenApiInfo?openApiUrl=http://localhost:1880/test.json](http://localhost:1880/getNewOpenApiInfo?openApiUrl=http://localhost:1880/test.json)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 March 2020 09:41 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/9 "2020-03-24T09:41:05Z")

</div>

There is also the hierarchical aspect to the naming. A node-red-contrib node is firstly node-red, then it is contributed (rather than core maintained which would be node-red-node-) then the next bit indicates the functionality.  
Also the alphabetic sorting issue. In package.json dependencies the nodes appear alphabetically so one can easily see all the contrib nodes. Also when looking in the node\_modules it is useful to be able to sort and find the contrib nodes.  
All in all it would be better to stick to the convention.

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 09:44 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/10 "2020-03-24T09:44:54Z")

</div>

Hmm... that shouldn't happen. We will look into it. Thanks for reporting!

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [24 March 2020 10:05 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/11 "2020-03-24T10:05:30Z")

</div>

The prefix `node-red-contrib` is something that we all recognise (as node-RED users), and gives us confidence that the node is designed specifically for use with node-RED, and therefore has less chance of breaking things.  
Using this naming protocol has worked well so far for our community, why change things....

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 10:07 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/12 "2020-03-24T10:07:18Z")

</div>

Valid points that I do understand. So we will definitley discuss that internally.

Anyway, I have to say that this actually **IS** the current convention as it is mentioned in the [documentation](https://nodered.org/docs/creating-nodes/packaging#Naming).

Maybe this should be discussed and clarified separate from this thread. In the end we need a decision whether naming-schemes like ours are also ok or whether the documentation needs an update. Otherwhise this will surely come up again.

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 10:09 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/13 "2020-03-24T10:09:02Z")

</div>

@dceejay We tested it and it works for us. 🤔 Could you provide us with a sample flow to reproduce it? Thanks!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 March 2020 10:12 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/14 "2020-03-24T10:12:05Z")

</div>

> [@2WeltenChris](#):
>
> Anyway, I have to say that this actually **IS** the current convention as it is mentioned in the [documentation](https://nodered.org/docs/creating-nodes/packaging#Naming).

Absolutely correct.

The only requirement is that **if** you use `node-red` at the start of your node's name, then please use `node-red-contrib-`. If you don't use `node-red` at the start of your node's name then we don't care.

That is how it has _always_ been. It has **never** been a requirement for all nodes to start with `node-red-contrib-`.

> [@Paul-Reed](#):
>
> Gives us confidence that the node is designed specifically for use with node-RED

You get that confidence from the fact it's listed on [flows.nodered.org](http://flows.nodered.org).

---

<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:** [24 March 2020 10:20 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/15 "2020-03-24T10:20:51Z")

</div>

Not much of a flow... just your node..

```auto
[{"id":"74dfff27.2a7d3","type":"openApi-red","z":"31d016ef.89a4ba","name":"sapient","openApiUrl":"http://localhost:1880/test.json","api":"","operation":"","operationData":{},"parameters":{},"x":340,"y":600,"wires":[[]]}]

```

but my settings.js has

```auto
httpAdminRoot: '/red',

```

and

```auto
httpStatic: '/Users/conway/node-red/web/',

```

which is the dir I serve my static files from (in this case the test.json)

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 10:28 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/16 "2020-03-24T10:28:58Z")

</div>

Thanks for clarification, @knolleary!

---

<div class="post-metadata">

**Author:** ![2WeltenChris](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/2weltenchris/32/12292_2.png) [@2WeltenChris](https://discourse.nodered.org/u/2WeltenChris)\
**Post date:** [24 March 2020 10:30 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/17 "2020-03-24T10:30:04Z")

</div>

Thanks - that information might just be what we need for testing. We never changed these settings. Will do so now. 🙂

---

<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:** [24 March 2020 10:34 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/18 "2020-03-24T10:34:22Z")

</div>

hmm - I think it's because you are using `RED.httpAdmin.get` and I'm sharing that file statically so it's not the admin path.May need some @knolleary advice here - as to best practise... as files like this (if hosted locally) feel like they should be in a users static directory... but what if that is also using authentication ? (I suppose when you hit load it should just prompt for user and password)

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [24 March 2020 11:31 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/19 "2020-03-24T11:31:59Z")

</div>

> [@knolleary](#):
>
> If you don't use `node-red` at the start of your node's name then we don't care.

@2WeltenChris

That is the Node-RED official position

But @colin makes very good points that helps us users 🙂

I always try to keep to existing conventions unless absolutely necessary to deviate

[xkcd: Standards](https://xkcd.com/927/) 🙂

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [24 March 2020 11:33 UTC](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545/20 "2020-03-24T11:33:06Z")

</div>

Indeed - but the documentation is the official position. If the community would like to suggest a change, then by all means do raise a PR with an alternative wording that can be discussed.

[Next page](https://discourse.nodered.org/t/announce-openapi-red-yet-another-swagger-client-node/23545.md?page=2)
