Coder Social home page Coder Social logo

vehicle-inventory-management-api's Introduction

IMS-API

  • PHP >=5.5.9
  • Symfony 2.7 LTS (Supported until May 2019)
    • Major Bundles:
      • friendsofsymfony/rest-bundle
      • jms/serializer-bundle
      • nelmio/api-doc-bundle
  • Doctrine 2.4
  • MySQL

Dependencies are managed by Composer
If Composer is not installed, read the installation instructions available at:

It is recommended that you install Composer globally. If you prefer not to, you can download the composer.phar file and run that in place of the global $ composer command.

Installation

  1. Clone this repository from Bitbucket to your desired installation path.

  2. All the following commands will assume you are in the root project folder.

    • eg: cd /var/www/ims-api
  3. Install the project dependencies

    • composer install
  4. Copy, rename and edit the parameters.yml.dist file to match the environment

    • cp app/config/parameters.yml.dist app/config/parameters.yml
    • Edit the file using your favourite editor
      • Vim: vim app/config/parameters.yml
      • NANO: nano app/config/parameters.yml
    • Change the parameters to match the environment config, including creating a random string for the secret.
  5. Create the database by running

    • php app/console doctrine:database:create
  6. Create the database schema by running

    • php app/console doctrine:schema:create
  7. DEVELOPMENT ENVIRONMENTS ONLY
    Generate some test fixtures by running
    php app/console doctrine:fixtures:load

Automated Testing

Performed using Behat.
Run the tests by executing

$ bin/behat

on the console.

API Documentation

Automatically generated using the Symfony bundle NelmioApiDocs. View the docs in your browser by going to:

http://<the-project-domain>/api/doc

Swagger.io documentation has also been enabled. CORS has not been enabled. Use the following URL:

http://<the-project-domain>/api/doc/swagger

Using the API

  • RTFM the API documentation described above.
  • JSON is the primary and preferred format for communication.
  • ALL JSON requests must use the header Content-Type: application/json.
  • When performing POST, PUT and PATCH:
    • Form data must be sent as valid JSON in the request body
    • The JSON must contain the form name as the top level property
      For example:
{
    "vehicle" : {
        "vin": "vin1234",
        "odometer": 10000,
        "manufacturer": 2,
        "model": 4,
    }
}
  • Translatable content is available through the Accept-Language request header. To translate some content, send a PATCH request with the header and the new content.

vehicle-inventory-management-api's People

Contributors

prakasha4devops avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.