ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
116 stars 67 forks source link

Add node_fetch code sample #29

Open hirenoble opened 4 years ago

hirenoble commented 4 years ago

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

ErikWittern commented 4 years ago

@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.

kbatuigas commented 1 year ago

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