{"openapi":"3.0.0","info":{"title":"2211102118_FAIRUZ AFIF HERDANTO_Website Jual Hewan Ternak","description":"Memiliki fungsi untuk menghubungkan database dengan website Jual Hewan Ternak. Request yang dapat dilakukan yaitu GET, POST, PUT , DELETE. Sehingga data bisa tersimpan di database","contact":{},"version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/FRZAFIFHERDANTO/2211102118_FAIRUZ_WebsiteJualHewanTernak/1.0.0"},{"url":"http://127.0.0.1:5000","variables":{}}],"paths":{"/HewanTernak":{"get":{"tags":["Misc"],"summary":"Menampilkan data dari database","description":"Memiiliki fungsi untuk menampilkan data dari database","operationId":"Menampilkandatadaridatabase","parameters":[],"responses":{"200":{"description":"OK","headers":{"Server":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Werkzeug/3.0.1 Python/3.12.0"}}},"Date":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Tue, 23 Jan 2024 15:23:31 GMT"}}},"Content-Length":{"content":{"text/plain":{"schema":{"type":"string"},"example":"234"}}},"Connection":{"content":{"text/plain":{"schema":{"type":"string"},"example":"close"}}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Hasilmenampilkandatum"},"description":"","example":[{"harga_hewan":"4.000.000","id_hewan":1,"jenis_hewan":"Kambing","umur_hewan":"12 "},{"harga_hewan":"15.000.000","id_hewan":2,"jenis_hewan":"Sapi","umur_hewan":"13 Bulan"}]},"example":[{"harga_hewan":"4.000.000","id_hewan":1,"jenis_hewan":"Kambing","umur_hewan":"12 "},{"harga_hewan":"15.000.000","id_hewan":2,"jenis_hewan":"Sapi","umur_hewan":"13 Bulan"}]}}}},"deprecated":false},"post":{"tags":["Misc"],"summary":"Menambahkan data ke database","description":"Memiliki fungsi untuk menambahkan data ke database","operationId":"Menambahkandatakedatabase","parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["jenis_hewan","umur_hewan","harga_hewan"],"type":"object","properties":{"jenis_hewan":{"type":"string","example":"Sapi"},"umur_hewan":{"type":"string","example":"13 Bulan"},"harga_hewan":{"type":"string","example":"15.000.000"}}}}},"required":false},"responses":{"200":{"description":"OK","headers":{"Server":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Werkzeug/3.0.1 Python/3.12.0"}}},"Date":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Tue, 23 Jan 2024 15:23:09 GMT"}}},"Content-Length":{"content":{"text/plain":{"schema":{"type":"string"},"example":"22"}}},"Connection":{"content":{"text/plain":{"schema":{"type":"string"},"example":"close"}}}},"content":{"text/html; charset=utf-8":{"schema":{"type":"string","example":"Data hewan ditambahkan"},"example":"Data hewan ditambahkan"}}}},"deprecated":false},"put":{"tags":["Misc"],"summary":"Mengupdate data pada database","description":"Memiliki fungsi untuk mengupdate data pada database","operationId":"Mengupdatedatapadadatabase","parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"required":["id_hewan","jenis_hewan","umur_hewan","harga_hewan"],"type":"object","properties":{"id_hewan":{"type":"integer","format":"int32","example":1},"jenis_hewan":{"type":"string","example":"Kambing"},"umur_hewan":{"type":"string","example":"12 bulan"},"harga_hewan":{"type":"string","example":"5.000.000"}}}}},"required":false},"responses":{"200":{"description":"OK","headers":{"Server":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Werkzeug/3.0.1 Python/3.12.0"}}},"Date":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Tue, 23 Jan 2024 15:24:34 GMT"}}},"Content-Length":{"content":{"text/plain":{"schema":{"type":"string"},"example":"24"}}},"Connection":{"content":{"text/plain":{"schema":{"type":"string"},"example":"close"}}}},"content":{"text/html; charset=utf-8":{"schema":{"type":"string","example":"Update data hewan sukses"},"example":"Update data hewan sukses"}}}},"deprecated":false},"delete":{"tags":["Misc"],"summary":"Menghapus data pada database","description":"Memiliki fungsi untuk menghapus data pada database","operationId":"Menghapusdatapadadatabase","parameters":[],"responses":{"200":{"description":"OK","headers":{"Server":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Werkzeug/3.0.1 Python/3.12.0"}}},"Date":{"content":{"text/plain":{"schema":{"type":"string"},"example":"Tue, 23 Jan 2024 15:25:28 GMT"}}},"Content-Length":{"content":{"text/plain":{"schema":{"type":"string"},"example":"26"}}},"Connection":{"content":{"text/plain":{"schema":{"type":"string"},"example":"close"}}}},"content":{"text/html; charset=utf-8":{"schema":{"type":"string","example":" Data hewan Sukses dihapus"},"example":" Data hewan Sukses dihapus"}}}},"deprecated":false}}},"components":{"schemas":{"Hasilmenampilkandatum":{"title":"Hasilmenampilkandatum","required":["harga_hewan","id_hewan","jenis_hewan","umur_hewan"],"type":"object","properties":{"harga_hewan":{"type":"string"},"id_hewan":{"type":"integer","format":"int32"},"jenis_hewan":{"type":"string"},"umur_hewan":{"type":"string"}},"example":{"harga_hewan":"4.000.000","id_hewan":1,"jenis_hewan":"Kambing","umur_hewan":"12 "}}}},"tags":[{"name":"Misc","description":""}]}