Shields badge specification, website and default API server
Go to file
Kevin Locke ced7f16645 [PATCH v2] Add support for swagger.io validator
The OpenAPI Specification (formerly known as the Swagger RESTful API
Documentation Specification) defines a format for describing RESTful
APIs.  The Swagger project provides a set of tools for working with this
format, including a hosted validator which provides a validation badge
and JSON result.[1]  This commit adds shields.io support for this badge.

The service currently only provides validation of files conforming to
version 2.0 of the OpenAPI Specification.  This commit adds a path
component for specifying the version under the assumption that the
validator may support version 3.0 or later as they are released.

It accepts the URL to validate as two path components, a scheme followed
by the rest of the URL, to match the convention used for the JIRA host
and webpage online shields.

Changes in v2:
- Use bitbucket in try.html example for clarity.
- Change /v/ in URL to /valid/ to avoid conflict with v=version.

1.  https://github.com/swagger-api/validator-badge

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-03-30 11:41:21 -04:00
lib Use new Buffer() instead of Buffer() 2017-03-29 18:28:48 -04:00
logo Add bitHound integration. 2015-12-30 10:03:52 -06:00
public Ensure that logo.svg is at the root 2017-02-05 16:24:15 +01:00
spec Fix Markdown formatting error 2015-04-16 22:43:15 +02:00
templates Pre-compress badge templates with SVGO 2017-02-25 18:20:07 +01:00
test Change some .on to .once to make tests less flaky 2017-03-30 00:18:30 +02:00
.buildpacks Node engine version information. Deployment files. 2014-01-03 19:25:49 +01:00
.dockerignore Fixed Dockerfile and improved doc regarding secret.json. 2016-08-18 13:28:37 +02:00
.editorconfig .editorconfig file to help all contributers to align to a common project specific standards. 2015-11-05 20:32:40 +02:00
.eslintrc.yml Prevent lint errors 2017-03-30 00:18:30 +02:00
.gitignore Add github standard node gitignores 2017-03-29 19:49:19 +02:00
.travis.yml Migrate to the new container based infra on Travis-ci 2017-03-29 23:55:52 +02:00
CNAME CNAME for shields.io 2014-02-24 11:53:27 +01:00
CONTRIBUTING.md Mention the need to minimize .svg images 2017-01-24 23:03:12 +01:00
coverage.svg New coverage badge 2015-06-06 11:43:59 +02:00
Dockerfile Fixed Dockerfile and improved doc regarding secret.json. 2016-08-18 13:28:37 +02:00
favicon.png favicon.png recompress with zopflipng losslessly 2016-03-13 00:13:31 +08:00
gh-badge.js Organize local modules in lib 2017-03-26 22:57:55 +02:00
index.html Disambiguate provider vs package: Package Control 2017-03-27 16:54:39 -04:00
INSTALL.md add format documentation links 2017-03-27 16:56:10 -04:00
LICENSE.md Files related to the switch to the shields repo. 2014-02-23 22:53:34 +01:00
logo.svg Ensure that logo.svg is at the root 2017-02-05 16:24:15 +01:00
Makefile Add s2 server 2017-02-13 00:54:23 +01:00
package.json Use a glob pattern instead of hard-coding filenames 2017-03-30 00:18:30 +02:00
README.md Add docs.rs as a standard-compliant service 2017-03-27 17:05:17 -04:00
server.js [PATCH v2] Add support for swagger.io validator 2017-03-30 11:41:21 -04:00
try.html [PATCH v2] Add support for swagger.io validator 2017-03-30 11:41:21 -04:00

Gratipay npm version build status

An image server for legible and concise information. Our Homepage | Twitter

Make your own badges here! (Quick guide: https://img.shields.io/badge/left-right-f39f37.svg.)

Solving the problem

Many GitHub repositories sport badges for things like:

Travis CI

(build status)

Travis CI badge
Gemnasium

(dependency checks)

Gemnasium badge
Code Climate

(static analysis)

Code Climate badge
RubyGems

(released gem version)

RubyGems badge

As you can see from the zoomed 400% versions of these badges above, nobody is (really) using the same badge file and at normal size, they're hardly legible. Worst of all, they're completely inconsistent. The information provided isn't of the same kind on each badge. The context is blurry, which doesn't make for a straightforward understanding of how these badges are relevant to the project they're attached to and what information they provide.

The Shields solution

As you can see below, without increasing the footprint of these badges, I've tried to increase legibility and coherence, removing useless text to decrease the horizontal length in the (likely) scenario that more of these badge thingies crop up on READMEs all across the land.

Badge design

This badge design corresponds to an old and now deprecated version which has since been replaced by beautiful and scalable SVG versions that can be found on shields.io.

Examples

What kind of metadata can you convey using badges?

  • test build status: build | failing
  • code coverage percentage: coverage | 80%
  • stable release version: version | 1.2.3
  • package manager release: gem | 1.2.3
  • status of third-party dependencies: dependencies | out-of-date
  • static code analysis GPA: code climate | 3.8
  • SemVer version observance: semver | 2.0.0
  • amount of Gratipay donations per week: tips | $2/week

Services using the Shields standard

Legal

All assets and code are under the CC0 LICENSE and in the public domain unless specified otherwise.

The assets in logo/ are trademarks of their respective companies and are under their terms and license.