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
29 add background fastapi tasks for pdf generation (#30)
* Append background task to reporting
* Add pdf file name which will be used in the future
* Decoded JWT info update
* Add user ID inside pdf name
* Retrieve user PDF
* Add response schema
* Update reporting dir and test locally
* Refactor usage uuid
---------
Co-authored-by: JoleVLF <Jovan@DESKTOP-JTIACNO>
Copy file name to clipboardExpand all lines: README.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,8 +51,25 @@ docker compose up
51
51
52
52
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)
53
53
54
-
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/20645c6e8e3545d02c7c4570271bdc49/raw/6efafb74bd2bc33e4221ee2a202d0c830b867c70/reporting)
54
+
Full list of APIs available you can check [here](https://editor-next.swagger.io/?url=https://gist.githubusercontent.com/JoleVLF/b1bcdd77ac82aeb115a6c94fb3dadbdc/raw/4ce7fea5b022142002d0dfebcd2156a3e408fbe4/api.json)
55
55
# Documentation
56
+
<h3>GET</h3>
57
+
58
+
```
59
+
/api/v1/openagri-report/{report_id}/
60
+
```
61
+
62
+
## Path Params
63
+
64
+
### report_id
65
+
-**Type**: `uuid str`
66
+
-**Description**: UUID of the generated PDF file..
67
+
68
+
69
+
## Response
70
+
71
+
Response is generated PDF file.
72
+
56
73
<h3>POST</h3>
57
74
58
75
```
@@ -69,8 +86,7 @@ Full list of APIs available you can check [here](https://editor-next.swagger.io/
69
86
70
87
## Response
71
88
72
-
Response is generated PDF file.
73
-
89
+
Response is uuid of generated PDF file.
74
90
75
91
<h3>POST</h3>
76
92
@@ -95,13 +111,13 @@ Response is generated PDF file.
95
111
96
112
97
113
## Response
98
-
Response is generated PDF file.
114
+
Response is uuid of generated PDF file.
99
115
100
116
<h3> Example usage </h3>
101
117
102
118
Compost and Irrigation Report APIs can be used with and without Gatekeeper support.
103
119
If Gatekeeper is used, data file param can be ignored.
104
-
When service is run wihtout Gatekeeper data must be provided in .json file format.
120
+
When service is run without Gatekeeper data must be provided in .json file format.
105
121
106
122
107
123
```shell
@@ -142,7 +158,7 @@ If a valid JSON file is uploaded, the API processes the data directly to generat
142
158
143
159
## Response
144
160
145
-
Response is generated PDF file.
161
+
Response is uuid of generated PDF file.
146
162
147
163
<h2>Pytest</h2>
148
164
Pytest can be run on the same machine the service has been deployed to by moving into the tests dir and running:
0 commit comments