Skip to content

attdevsupport/restlint

Repository files navigation

RESTLint - RESTful API Specification Static Checker


Description

RESTLint is a web based application that reads in a RESTful API design specification (i.e. Swagger2), and checks the design against HTTP standards, AT&T standards and best practices, and some security checks.


How to Load the website

You can load the website in the following way:

Download the repo locally. You can either download a zip file from the repo or you can clone the repo onto your local machine. Once downloaded onto your local machine, you can host the files through a local web server, and use your browser to navigate to the local web server. For example, if you have python installed, you can run this command in the root of the repo directory to serve the files:

Python2

python -m SimpleHTTPServer 8080 # assuming port 8080 is not used already.

Python3

python -m http.server 8080 # assuming port 8080 is not used already.

Then you can navigate your browser to localhost:8080/dist/


Using the website

Optimizations

  • Minified CSS with htmlmin to reduce file size
  • Minified JS with uglify-js to reduce file size
  • Inlined CSS to avoid another round trip with inline-source
  • Inlined JS to avoid another round trip with inline-source
  • Added async to the map request to stop blocking
  • Moved javascript to end of body to minimize blocking

Build Automation

Used Gulp to automate the building and common tasks of the website. Includes the following:

  • minification of javascript using uglify
  • minification of HTML and CSS using htmlmin
  • inlining CSS using inline source
  • Javascript linting using eslint
  • CSS linting using csslint
  • moves all assets under the dist/ directory

Gulp dependencies are in the package.json file

You need to install nodejs/npm and gulp first.

To generate distribution, run the following in the root directory of the repo

Install Dependencies

npm install

Generate Distribution

gulp main

You can run individual tasks by replacing main with either html, css,js or img The resulting files for distribution will be in the dist/ directory


Resources


License

This project is licensed under the terms of the MIT license. (See LICENSE.md)

Copyright (c) 2018 Brett Schwarz

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published