|
5 | 5 | # |
6 | 6 | import inflect |
7 | 7 |
|
8 | | -from cmr import render |
9 | | - |
10 | | -from connect.client.models import Action, Collection, NS, Resource, ResourceSet |
| 8 | +from connect.client.models import ( |
| 9 | + Action, |
| 10 | + AsyncAction, |
| 11 | + AsyncCollection, |
| 12 | + AsyncNS, |
| 13 | + AsyncResource, |
| 14 | + AsyncResourceSet, |
| 15 | + Collection, |
| 16 | + NS, |
| 17 | + Resource, |
| 18 | + ResourceSet, |
| 19 | +) |
| 20 | +from connect.utils.terminal.markdown import render |
11 | 21 |
|
12 | 22 |
|
13 | 23 | _COL_HTTP_METHOD_TO_METHOD = { |
@@ -186,19 +196,19 @@ def format(self, obj): |
186 | 196 | if not self._specs: |
187 | 197 | return render('**No OpenAPI specs available.**') |
188 | 198 |
|
189 | | - if isinstance(obj, NS): |
| 199 | + if isinstance(obj, (NS, AsyncNS)): |
190 | 200 | return self.format_ns(obj) |
191 | 201 |
|
192 | | - if isinstance(obj, Collection): |
| 202 | + if isinstance(obj, (Collection, AsyncCollection)): |
193 | 203 | return self.format_collection(obj) |
194 | 204 |
|
195 | | - if isinstance(obj, Resource): |
| 205 | + if isinstance(obj, (Resource, AsyncResource)): |
196 | 206 | return self.format_resource(obj) |
197 | 207 |
|
198 | | - if isinstance(obj, Action): |
| 208 | + if isinstance(obj, (Action, AsyncAction)): |
199 | 209 | return self.format_action(obj) |
200 | 210 |
|
201 | | - if isinstance(obj, ResourceSet): |
| 211 | + if isinstance(obj, (ResourceSet, AsyncResourceSet)): |
202 | 212 | return self.format_resource_set(obj) |
203 | 213 |
|
204 | 214 | return self.format_client() |
|
0 commit comments