@@ -29,9 +29,11 @@ def add_routes(self, app: web.Application):
29
29
30
30
@aiohttp_apispec .docs (tags = ['facts' ],
31
31
summary = 'Retrieve Facts' ,
32
- description = 'Retrieve facts by criteria. Use fields from the `FactSchema` in the request body to filter retrieved facts.' )
32
+ description = 'Retrieve facts by criteria. Use fields from the `FactSchema` in the request '
33
+ 'body to filter retrieved facts.' )
33
34
@aiohttp_apispec .querystring_schema (BaseGetAllQuerySchema )
34
- @aiohttp_apispec .response_schema (FactSchema (many = True , partial = True ), description = 'Returns a list of matching facts, dumped in `FactSchema` format.' )
35
+ @aiohttp_apispec .response_schema (FactSchema (many = True , partial = True ),
36
+ description = 'Returns a list of matching facts, dumped in `FactSchema` format.' )
35
37
async def get_facts (self , request : web .Request ):
36
38
knowledge_svc_handle = self ._api_manager .knowledge_svc
37
39
fact_data = await self ._api_manager .extract_data (request )
@@ -49,9 +51,11 @@ async def get_facts(self, request: web.Request):
49
51
50
52
@aiohttp_apispec .docs (tags = ['relationships' ],
51
53
summary = "Retrieve Relationships" ,
52
- description = 'Retrieve relationships by criteria. '
53
- 'Use fields from the `RelationshipSchema` in the request body to filter retrieved relationships.' )
54
- @aiohttp_apispec .response_schema (RelationshipSchema , description = 'Returns a list of matching relationships, dumped in `RelationshipSchema` format.' )
54
+ description = 'Retrieve relationships by criteria. Use fields from the `RelationshipSchema` in '
55
+ 'the request body to filter retrieved relationships.' )
56
+ @aiohttp_apispec .response_schema (RelationshipSchema ,
57
+ description = 'Returns a list of matching relationships, dumped in '
58
+ '`RelationshipSchema` format.' )
55
59
@aiohttp_apispec .querystring_schema (BaseGetAllQuerySchema )
56
60
@aiohttp_apispec .response_schema (RelationshipSchema (many = True , partial = True ))
57
61
async def get_relationships (self , request : web .Request ):
@@ -96,9 +100,12 @@ async def add_facts(self, request: web.Request):
96
100
97
101
@aiohttp_apispec .docs (tags = ['relationships' ],
98
102
summary = 'Create a Relationship' ,
99
- description = 'Create a new relationship using the format provided in the `RelationshipSchema`.' )
103
+ description = 'Create a new relationship using the format provided in the '
104
+ '`RelationshipSchema`.' )
100
105
@aiohttp_apispec .request_schema (RelationshipSchema )
101
- @aiohttp_apispec .response_schema (RelationshipSchema , description = 'Returns the created relationship, dumped in `RelationshipSchema` format.' )
106
+ @aiohttp_apispec .response_schema (RelationshipSchema ,
107
+ description = 'Returns the created relationship, dumped in `RelationshipSchema` '
108
+ 'format.' )
102
109
async def add_relationships (self , request : web .Request ):
103
110
knowledge_svc_handle = self ._api_manager .knowledge_svc
104
111
relationship_data = await self ._api_manager .extract_data (request )
@@ -138,7 +145,8 @@ async def add_relationships(self, request: web.Request):
138
145
description = 'Delete facts using the format provided in the `FactSchema`. '
139
146
'This will delete all facts that match the criteria specified in the payload.' )
140
147
@aiohttp_apispec .request_schema (FactSchema (partial = True ))
141
- @aiohttp_apispec .response_schema (FactSchema , description = 'Returns the deleted fact(s), dumped in `FactSchema` format.' )
148
+ @aiohttp_apispec .response_schema (FactSchema ,
149
+ description = 'Returns the deleted fact(s), dumped in `FactSchema` format.' )
142
150
async def delete_facts (self , request : web .Request ):
143
151
knowledge_svc_handle = self ._api_manager .knowledge_svc
144
152
fact_data = await self ._api_manager .extract_data (request )
@@ -155,8 +163,11 @@ async def delete_facts(self, request: web.Request):
155
163
@aiohttp_apispec .docs (tags = ['relationships' ],
156
164
summary = 'Delete One or More Relationships' ,
157
165
description = ('Delete relationships using the format provided in the RelationshipSchema. '
158
- 'This will delete all relationships that match the criteria specified in the payload.' ))
159
- @aiohttp_apispec .response_schema (RelationshipSchema , description = 'Returns the deleted relationship(s), dumped in RelationshipSchema format.' )
166
+ 'This will delete all relationships that match the criteria specified in the '
167
+ 'payload.' ))
168
+ @aiohttp_apispec .response_schema (RelationshipSchema ,
169
+ description = 'Returns the deleted relationship(s), dumped in RelationshipSchema '
170
+ 'format.' )
160
171
@aiohttp_apispec .request_schema (RelationshipSchema (partial = True ))
161
172
async def delete_relationships (self , request : web .Request ):
162
173
knowledge_svc_handle = self ._api_manager .knowledge_svc
@@ -176,7 +187,8 @@ async def delete_relationships(self, request: web.Request):
176
187
description = ('Update existing facts using the format provided in the `FactSchema`. '
177
188
'This will update all facts that match the criteria specified in the payload.' ))
178
189
@aiohttp_apispec .request_schema (FactUpdateRequestSchema (partial = True ))
179
- @aiohttp_apispec .response_schema (FactSchema , description = 'Returns the updated fact(s), dumped in `FactSchema` format.' )
190
+ @aiohttp_apispec .response_schema (FactSchema ,
191
+ description = 'Returns the updated fact(s), dumped in `FactSchema` format.' )
180
192
async def update_facts (self , request : web .Request ):
181
193
knowledge_svc_handle = self ._api_manager .knowledge_svc
182
194
fact_data = await self ._api_manager .extract_data (request )
@@ -198,10 +210,13 @@ async def update_facts(self, request: web.Request):
198
210
199
211
@aiohttp_apispec .docs (tags = ['relationships' ],
200
212
summary = 'Update One or More Relationships' ,
201
- description = ('Update existing relationships using the format provided in the `RelationshipSchema`. '
202
- 'This will update all relationships that match the criteria specified in the payload.' ))
213
+ description = ('Update existing relationships using the format provided in the '
214
+ '`RelationshipSchema`. This will update all relationships that match the '
215
+ 'criteria specified in the payload.' ))
203
216
@aiohttp_apispec .request_schema (RelationshipUpdateSchema (partial = True ))
204
- @aiohttp_apispec .response_schema (RelationshipSchema , description = 'Returns the updated relationship(s), dumped in `RelationshipSchema` format.' )
217
+ @aiohttp_apispec .response_schema (RelationshipSchema ,
218
+ description = 'Returns the updated relationship(s), dumped in `RelationshipSchema` '
219
+ 'format.' )
205
220
async def update_relationships (self , request : web .Request ):
206
221
knowledge_svc_handle = self ._api_manager .knowledge_svc
207
222
relationship_data = await self ._api_manager .extract_data (request )
0 commit comments