Update: March 20th 2017 The improved error handler from within this project has now been merged into the main linter-swagger project. This project will be kept here for reference, but I recommend everyone switch to using the linter-swagger project where this functionality will be maintained from now on.
An improved version of the linter-swagger plugin with better identification of errors within your swagger files.
This plugin for Linter will lint Swagger 2.0 specifications, both JSON and YAML using swagger-parser
node package.
Debugging Swagger spec errors has always been a frustrating experience, with the error messages given seemingly random and arbitrary. Here are a few examples of how this plugin improves things.
swagger: "2.0"info:title: "Sample 1"version: "1.0.0"paths:/todos:get:description: "Returns all todo items"responses:200:description: "A list of todo items"schema:type: arrayitems:type: objectproperties:id:type: strinformat: uuidname:type: string
Now | |
---|---|
Before |
swagger: "2.0"info:title: "Sample 2"version: "1.0.0"paths:/todos:get:description: "Returns all todo items"responses:200:description: "A list of todo items"schema:type: arrayitems:type: objectproperties:id:type: stringforma: uuidname:type: string
Now | |
---|---|
Before |
Install linter-swagger-improved
either in Atom's Preferences/Install Packages, or with
apm
on the command-line:
apm install linter-swagger-improved
This package will automatically install linter
if that is missing.
MIT. More info in the LICENSE file
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.