Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swagger-snippet

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-snippet - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "swagger-snippet",
"version": "0.1.1",
"version": "0.1.2",
"description": "Generates code snippets for given Swagger / Open API Specification files",

@@ -5,0 +5,0 @@ "repository": {

# swagger-snippet
Generates code snippets for given Swagger / Open API specification files.
This package takes as input a Swagger 2.0 / Open API specification. Optionally, validates that specification. Translates the specification into an [HTTP Archive 1.2 request object](http://www.softwareishard.com/blog/har-12-spec/#request). Uses the [HTTP Snippet](https://github.com/Mashape/httpsnippet) library to generate code snippets for every API endpoint defined in the specification in various languages & tools (`cURL`, `Node`, `Python`, `Ruby`, `Java`, `Go`, `C#`...).
This package takes as input a Swagger 2.0 / Open API specification. Optionally, it validates that specification. Translates the specification into an [HTTP Archive 1.2 request object](http://www.softwareishard.com/blog/har-12-spec/#request). Uses the [HTTP Snippet](https://github.com/Mashape/httpsnippet) library to generate code snippets for every API endpoint defined in the specification in various languages & tools (`cURL`, `Node`, `Python`, `Ruby`, `Java`, `Go`, `C#`...).

@@ -45,3 +45,3 @@ ## Installation

"title": "Node + Native",
"content": "var http = require(\"https\");\n\nvar options = {\n \"method\": \"GET\",\n \"hostname\": \"api.instagram.com\",\n \"port\": null,\n \"path\": \"/v1/users/%7Buser-id%7D/relationship\",\n \"headers\": {\n \"access_token\": \"REPLACE_KEY_VALUE\"\n }\n};\n\nvar req = http.request(options, function (res) {\n var chunks = [];\n\n res.on(\"data\", function (chunk) {\n chunks.push(chunk);\n });\n\n res.on(\"end\", function () {\n var body = Buffer.concat(chunks);\n console.log(body.toString());\n });\n});\n\nreq.end();"
"content": "var http = require(\"https\");\n\nvar options = {..."
}

@@ -48,0 +48,0 @@ ]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc