Giter VIP home page Giter VIP logo

devops-orange's Introduction

Orange_Task

How to build

  • If you have eclipse installed you can import a maven project if not use pom.xml to get the dependencies and the code in Toy0Store/src/ folder to bilud the project.

  • Change the database credentials in "src/main/resources/application.properties." Example:

spring.datasource.ur=jdbc:mysql://localhost:3306/toystore
spring.datasource.username=root
spring.datasource.password=
  • Run the project as a Java application

Usage

  • List all categories
	Send GET request to /categories
  • List one category
	Send GET request to /categories/{id}
  • Add category
    Send Post request to /categories
    
    # the Post request contains a JSON file represnting
    # a category. example:  
    
    {
        "name": "board Games",
        "id": 3
    }
    
  # note: id can be null or any number the database auto increament the id
  • Update category
    Send PUT request to /categories/{id}
 	
    # the PUT request contains a JSON file represnting
    # a category. example:   
    
    {
        "name": "board Games",
        "id": 3
    }
    
  # note: id can be null or any number the category with the id in the url gets modified
  • Delete category
	Send DELETE request to /categories/{id}
  • List all products
	Send GET request to /products
  • List one product
	Send GET request to /products/{id}
  • List products by category
	Send GET request to categories/{id}/products
  • Add product
    Send Post request to /products
    
    # the Post request contains a JSON file represnting
    # a product. example:  
    
   {
        "categoryID": 4,
        "name": "fifa18",
        "id": 2,
        "description": "football",
        "price": 1000
    }
    
  # note: id can be null or any number the database auto increament the id categoryID must be provided
  • Update product
    Send PUT request to /products/{id}
 	
    # the PUT request contains a JSON file represnting
    # a product. example:   
   
   {
        "categoryID": 4,
        "name": "fifa18",
        "id": 2,
        "description": "football",
        "price": 1000
    }
    
  # note: id can be null or any number the category with the id in the url gets modified
  • Delete product
	Send DELETE request to /products/{id}

devops-orange's People

Contributors

ahmedfarouk1414 avatar m-ayman avatar

Watchers

 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.