HTTP methods that are supported by Swagger 2.0

Downloads in past


403.0.23 years ago3 years agoMinified + gzip package size for @apidevtools/swagger-methods in KB


Swagger Methods

HTTP methods that are supported by Swagger 2.0

Cross-Platform Compatibility Build Status
Coverage Status Dependencies
npm License Buy us a tree
This is an array of lower-case HTTP method names that are supported by the Swagger 2.0 spec.
This module is tested against the Swagger 2.0 schema


Install using npm:
npm install @apidevtools/swagger-methods


var methods = require('@apidevtools/swagger-methods');

methods.forEach(function(method) {

// get
// put
// post
// delete
// options
// head
// patch


I welcome any contributions, enhancements, and bug-fixes. Open an issue on GitHub and submit a pull request.


To build/test the project locally on your computer:
  1. Clone this repo
git clone https://github.com/APIDevTools/swagger-methods.git
  1. Install dev dependencies
npm install
  1. Run the unit tests
npm test


MIT license. Use it however you want.
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

Big Thanks To

Thanks to these awesome companies for their support of Open Source developers ❤
Travis CI SauceLabs Coveralls