You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69-4Lines changed: 69 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ docker compose up
60
60
61
61
The application will be served on http://127.0.0.1:8009 (I.E. typing localhost/docs in your browser will load the swagger documentation)
62
62
63
-
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/c29adf44808a683149426912383c75eb/raw/7b57a845ab37954424c0ef2108962fd248c6966f/api_v4.json)
63
+
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/7f5771b23a44e508b82e47d5fafd9f9c/raw/0ab48e33303efb114d7467a3ec1d8833fd62ff22/v5.json)
64
64
# Documentation
65
65
<h3>GET</h3>
66
66
@@ -211,14 +211,79 @@ If a valid JSON file is uploaded, the API processes the data directly to generat
211
211
212
212
Response is uuid of generated PDF file.
213
213
214
+
<h3>POST</h3>
215
+
216
+
```
217
+
/api/v1/openagri-report/pesticides-report/
218
+
```
219
+
220
+
## Request Params
221
+
222
+
### pesticide_id
223
+
-**Type**: `uudi str`
224
+
-**Description**: ID of Pesticide operation for which PDF is generated (optional)
225
+
226
+
### data
227
+
-**Type**: `UploadFile`
228
+
-**Description**: API processes the data directly to generate the report if data passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
229
+
230
+
-### from_date
231
+
-**Type**: `date`
232
+
-**Description**: Optional date filter (from which data is filtered)
233
+
234
+
-### to_date
235
+
-**Type**: `date`
236
+
-**Description**: AOptional date filter (until which data is filtered)
237
+
238
+
-### parcel_id
239
+
-**Type**: `str`
240
+
-**Description**: Optional parcel filter.
241
+
-
242
+
## Response
243
+
244
+
Response is uuid of generated PDF file.
245
+
246
+
<h3>POST</h3>
247
+
248
+
249
+
```
250
+
/api/v1/openagri-report/fertilization-report/
251
+
```
252
+
253
+
## Request Params
254
+
255
+
### fertilization_id
256
+
-**Type**: `uudi str`
257
+
-**Description**: ID of fert operation for which PDF is generated (optional)
258
+
259
+
### data
260
+
-**Type**: `UploadFile`
261
+
-**Description**: API processes the data directly to generate the report if data passed. This parameter is not required and when it is, must be provided as an `UploadFile`.
262
+
263
+
-### from_date
264
+
-**Type**: `date`
265
+
-**Description**: Optional date filter (from which data is filtered)
266
+
267
+
-### to_date
268
+
-**Type**: `date`
269
+
-**Description**: AOptional date filter (until which data is filtered)
270
+
271
+
-### parcel_id
272
+
-**Type**: `str`
273
+
-**Description**: Optional parcel filter.
274
+
-
275
+
## Response
276
+
277
+
Response is uuid of generated PDF file.
278
+
214
279
<h2>Pytest</h2>
215
-
Pytest can be run on the same machine the service has been deployed to by moving into the tests dir and running:
280
+
Pytest can be run on the same machine the service has been deployed to by moving into the app dir and running:
216
281
217
282
```
218
-
pytest tests_.py
283
+
pytest
219
284
```
220
285
221
-
This will run the tests and return success values for each api tested in the terminal.
286
+
This will run all tests and return success values for each api tested in the terminal.
222
287
223
288
<h3>These tests will NOT result in generated .pdf files.</h3>
0 commit comments