This repository was archived by the owner on Dec 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathREADME_common.handlebars
More file actions
89 lines (75 loc) · 2.67 KB
/
README_common.handlebars
File metadata and controls
89 lines (75 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{{#with apiInfo}}
{{#each apis}}
{{#if @first}}
{{#with operations}}
{{#each operation}}
{{#if @first}}
{{> api_doc_example }}
{{/if}}
{{/each}}
{{/with}}
{{/if}}
{{/each}}
{{/with}}
## Documentation for API Endpoints
All URIs are relative to *{{basePath}}*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
{{#with apiInfo}}{{#each apis}}{{#with operations}}{{#each operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#if summary}}{{summary}}{{/if}}
{{/each}}{{/with}}{{/each}}{{/with}}
## Documentation For Models
{{#each models}}{{#with model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
{{/with}}{{/each}}
## Documentation For Authorization
{{#unless authMethods}}
All endpoints do not require authorization.
{{/unless}}
{{#each authMethods}}
{{#if @last}} Authentication schemes defined for the API:{{/if}}
## {{{name}}}
{{#if isApiKey}}
- **Type**: API key
- **API key parameter name**: {{{keyParamName}}}
- **Location**: {{#if isKeyInQuery}}URL query string{{/if}}{{#if isKeyInHeader}}HTTP header{{/if}}
{{/if}}
{{#if isBasic}}
{{#if isBasicBasic}}
- **Type**: HTTP basic authentication
{{/if}}
{{#if isBasicBearer}}
- **Type**: Bearer authentication{{#if bearerFormat}} ({{{bearerFormat}}}){{/if}}
{{/if}}
{{#if isHttpSignature}}
- **Type**: HTTP signature authentication
{{/if}}
{{/if}}
{{#if isOAuth}}
- **Type**: OAuth
- **Flow**: {{{flow}}}
- **Authorization URL**: {{{authorizationUrl}}}
- **Scopes**: {{#unless scopes}}N/A{{/unless}}
{{#each scopes}} - **{{{scope}}}**: {{{description}}}
{{/each}}
{{/if}}
{{/each}}
## Author
{{#with apiInfo}}{{#each apis}}{{#unless hasMore}}{{#if infoEmail}}{{infoEmail}}{{/if}}
{{/unless}}{{/each}}{{/with}}
## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in {{{packageName}}}.{{apiPackage}}.tags.tag_to_api and {{{packageName}}}.{{modelPackage}}s may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1:
Use specific imports for apis and models like:
- `from {{{packageName}}}.{{apiPackage}}.default_api import DefaultApi`
- `from {{{packageName}}}.{{apiPackage}}.paths.some_path import SomePath`
- `from {{{packageName}}}.paths.some_path.get import ApiForget`
- `from {{{packageName}}}.{{modelPackage}}.pet import Pet`
Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import {{{packageName}}}
from {{{packageName}}}.{{apiPackage}}.tags.tag_to_api import *
from {{{packageName}}}.{{modelPackage}}s import *
```