openapi-snippet icon indicating copy to clipboard operation
openapi-snippet copied to clipboard

Add node_fetch code sample

Open hirenoble opened this issue 5 years ago • 2 comments

Hi Erik,

First of all, thank you very much for creating this package. It works great!

The node_request target creates a code sample using the https://www.npmjs.com/package/request package but recently there was an announcement that this will be no longer supported. Hence, it would be great to add/update node code sample using https://www.npmjs.com/package/node-fetch

hirenoble avatar Nov 08 '19 17:11 hirenoble

@hirenoble Glad to hear you like the package!

Under the hood, it actually uses the httpsnippet library, which determines valid targets. I.e., you would have to file this issue with them to add support for other libraries.

ErikWittern avatar Nov 16 '19 12:11 ErikWittern

Hi @ErikWittern ! We see that https://github.com/Kong/httpsnippet/tree/master/src/targets/node/fetch has been added to httpsnippet, would it be possible to add support for this in openapi-snippet? cc @hirenoble

kbatuigas avatar Nov 30 '22 21:11 kbatuigas