New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rdme

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdme

Upload your Swagger file to ReadMe

  • 0.6.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-97.29%
Maintainers
1
Weekly downloads
 
Created
Source

oas

Creating Swagger / Open API Spec files is hard. This makes it easier.

Installation

npm install oas -g

Usage

Go to a directory with your API, and type:

oas init

It will walk you through how to document your API with Open API Initiave.

Swagger Inline

Rather than trying to juggle one gigantic repo, oas uses something called swagger-inline. It lets you include a little swagger snippet in a comment above your code, and collects them all together into one Swagger file:

/*
 * @api [get] /pet/{petId}
 * description: "Returns all pets from the system that the user has access to"
 * parameters:
 *   - (path) petId=hi* {String} The pet ID
 *   - (query) limit {Integer:int32} The number of resources to return
*/
route.get("/pet/:petId", pet.show);

You need to start with @api [method] path, but everything below it is a valid Swagger Path Definition.

You can also do inline parameters, which are shorthand for parameters. They aren't valid Swagger, however Swagger Inline knows how to compile them:

- (in) name=default* {type:format} Description

Host your Swagger file

Hosting Swagger files is hard! So, we have an online component that hosts your Swagger file for you. Just type the following to get a URL:

oas host

This will upload your Swagger file and give you a URL you can use.

FAQs

Package last updated on 05 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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