Skip to content

emreincekara/rea-taskapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kullanılan Teknolojiler

.Net Core, Ocelot

Devops : Docker

Database : Postgresql, MongoDB

Projeyi Çalıştır

Aşağıdaki araçlara ihtiyacınız olacak:

Yükleme

  1. Projeyi klonlayın

    git clone https://github.com/emreincekara/rea-taskapp.git
  2. Proje dizinine gidin

    cd rea-taskapp
  3. docker-compose.yml dosyasını içeren dizinde aşağıdaki komutu çalıştırın:

    docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
  4. Docker'ın tüm microservice'leri oluşturmasını bekleyin.

  5. Microservice'leri aşağıdaki linkler ile çalıştırabilirsiniz:

API Kullanımı

Catalog API

Tüm öğeleri getir

  GET /catalog
Yanıt
{
  "id": "string",
  "name": "string",
  "imageUrl": "string",
  "price": 0,
  "categoryId": "string",
  "category": {
    "id": "string",
    "name": "string",
    "products": [
      "string"
    ]
  }
}

Öğeyi getir veya Sil

  GET|DELETE /catalog/${id}
Parametre Tip Açıklama
id uuid Gerekli.
Yanıt
{
  "name": "iPhone 11 128 GB",
  "imageUrl": "",
  "price": 12199.01,
  "categoryId": "584bd799-19e1-49c6-b61e-b3718d61d84e",
  "category": {
    "name": "Telefon",
    "products": [],
    "id": "584bd799-19e1-49c6-b61e-b3718d61d84e"
  },
  "id": "82d9a1cb-8db1-46ec-b940-21767ce8a05f"
}

Öğe Ekle veya Güncelle

  POST|PUT /catalog
İstek
{
  "name": "iPhone 11 128 GB",
  "imageUrl": "",
  "price": 12199.01,
  "categoryId": "584bd799-19e1-49c6-b61e-b3718d61d84e"
}

Ürün adına göre öğeyi getir

  GET /catalog/getProductByName/${name}
Parametre Tip Açıklama
name string Gerekli. Ürün adı.

Kategori adına göre öğeyi getir

  GET /catalog/getProductByCategory/${categoryName}
Parametre Tip Açıklama
categoryName string Gerekli. Kategori adı.

Customer API

Tüm öğeleri getir

  GET /customer
Yanıt
{
  "id": "uuid",
  "name": "string",
  "email": "user@example.com",
  "createdAt": "timestamp",
  "updatedAt": "timestamp",
  "address": {
    "id": "uuid",
    "customerId": "uuid",
    "addressLine": "string",
    "city": "string",
    "country": "string",
    "cityCode": 0
  }
}

Öğeyi getir veya Sil

  GET|DELETE /customer/${id}
Parametre Tip Açıklama
id uuid Gerekli.

Öğe Ekle veya Güncelle

  POST|PUT /customer
İstek
{
  "id": "uuid",
  "name": "string",
  "email": "user@example.com",
  "createdAt": "timestamp",
  "updatedAt": "timestamp",
  "address": {
    "id": "uuid",
    "customerId": "uuid",
    "addressLine": "string",
    "city": "string",
    "country": "string",
    "cityCode": 0
  }
}

Doğrulama Kontrolü

  GET /customer/validate/${id}
Parametre Tip Açıklama
id uuid Gerekli.
Yanıt
Boolean: true | false

Order API

Tüm öğeleri getir

  GET /order
Yanıt
{
  "id": "uuid",
  "customerId": "uuid",
  "quantity": 0,
  "price": 0,
  "status": "string",
  "addressId": "uuid",
  "productId": "uuid",
  "createdAt": "timestamp",
  "updatedAt": "timestamp"
}

Öğeyi getir veya Sil

  GET|DELETE /order/${id}
Parametre Tip Açıklama
id uuid Gerekli.

Öğe Ekle veya Güncelle

  POST|PUT /order
İstek
{
  "id": "uuid",
  "customerId": "uuid",
  "quantity": 0,
  "price": 0,
  "status": "string",
  "addressId": "uuid",
  "productId": "uuid",
  "createdAt": "timestamp",
  "updatedAt": "timestamp"
}

CustomerId'ye göre öğeyi getir

  GET /order/getOrdersByCustomerId/${customerId}
Parametre Tip Açıklama
customerId uuid Gerekli.

Id'ye göre Status değerini güncelle

  GET /order/${id}/${status}
Parametre Tip Açıklama
id uuid Gerekli.
status string Gerekli.

Lisans

MIT