1 | openapi: 3.1.0
|
---|
2 | info:
|
---|
3 | title: Web Modules
|
---|
4 | version: '1'
|
---|
5 |
|
---|
6 | components:
|
---|
7 | schemas:
|
---|
8 | TypeWebModuleName:
|
---|
9 | type: string
|
---|
10 |
|
---|
11 | TypeWebMethodPermissionEntry:
|
---|
12 | oneOf:
|
---|
13 | - type: integer
|
---|
14 | description: Explicit per method permission level
|
---|
15 | - type: string
|
---|
16 | const: 'inherit'
|
---|
17 | description: Inherit the module's global permission level
|
---|
18 |
|
---|
19 | WebModuleElement:
|
---|
20 | type: object
|
---|
21 | properties:
|
---|
22 | module:
|
---|
23 | $ref: '#/components/schemas/TypeWebModuleName'
|
---|
24 | permissionLevelGlobal:
|
---|
25 | type: integer
|
---|
26 | description: Permission level for the overall module
|
---|
27 | permissionLevelPerMethod:
|
---|
28 | type: object
|
---|
29 | properties:
|
---|
30 | GET:
|
---|
31 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
32 | POST:
|
---|
33 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
34 | PUT:
|
---|
35 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
36 | DELETE:
|
---|
37 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
38 | description: Permission levels per HTTP method
|
---|
39 | isDefault:
|
---|
40 | type: boolean
|
---|
41 | description: Whether this module uses the module's default permissions or the shown values are a user defined override
|
---|
42 | required:
|
---|
43 | - module
|
---|
44 | - permissionLevelGlobal
|
---|
45 | - permissionLevelPerMethod
|
---|
46 | - isDefault
|
---|
47 |
|
---|
48 | WebModuleList:
|
---|
49 | type: array
|
---|
50 | items:
|
---|
51 | $ref: '#/components/schemas/WebModuleElement'
|
---|
52 |
|
---|
53 |
|
---|
54 | requestBodies:
|
---|
55 | WebModuleBodyIn:
|
---|
56 | content:
|
---|
57 | application/json:
|
---|
58 | schema:
|
---|
59 | type: object
|
---|
60 | properties:
|
---|
61 | permissionLevelGlobal:
|
---|
62 | type: integer
|
---|
63 | description: Permission level for the overall module
|
---|
64 | permissionLevelPerMethod:
|
---|
65 | type: object
|
---|
66 | properties:
|
---|
67 | GET:
|
---|
68 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
69 | POST:
|
---|
70 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
71 | PUT:
|
---|
72 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
73 | DELETE:
|
---|
74 | $ref: '#/components/schemas/TypeWebMethodPermissionEntry'
|
---|
75 | description: Permission levels per HTTP method
|
---|
76 | required:
|
---|
77 | - permissionLevelGlobal
|
---|
78 | - permissionLevelPerMethod
|
---|
79 | required: true
|
---|
80 |
|
---|
81 |
|
---|
82 | parameters:
|
---|
83 | WebModuleNamePathParameter:
|
---|
84 | name: moduleName
|
---|
85 | in: path
|
---|
86 | required: true
|
---|
87 | schema:
|
---|
88 | $ref: '#/components/schemas/TypeWebModuleName'
|
---|
89 |
|
---|
90 |
|
---|
91 | paths:
|
---|
92 | /api/webmodules:
|
---|
93 | get:
|
---|
94 | tags:
|
---|
95 | - Permissions
|
---|
96 | summary: Web modules permission list
|
---|
97 | description: Fetch a list of all web module permissions
|
---|
98 | operationId: WebModules.get
|
---|
99 | responses:
|
---|
100 | 200:
|
---|
101 | description: List of web modules
|
---|
102 | content:
|
---|
103 | application/json:
|
---|
104 | schema:
|
---|
105 | type: object
|
---|
106 | properties:
|
---|
107 | data:
|
---|
108 | $ref: '#/components/schemas/WebModuleList'
|
---|
109 | meta:
|
---|
110 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
---|
111 | required:
|
---|
112 | - data
|
---|
113 | - meta
|
---|
114 | 403:
|
---|
115 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
116 | security:
|
---|
117 | - apiTokenName: [ ]
|
---|
118 | apiTokenSecret: [ ]
|
---|
119 | - sessionCookie: [ ]
|
---|
120 |
|
---|
121 |
|
---|
122 | /api/webmodules/{moduleName}:
|
---|
123 | # get:
|
---|
124 | # tags:
|
---|
125 | # - Permissions
|
---|
126 | # summary: Marker show
|
---|
127 | # description: Fetch a single defined map marker
|
---|
128 | # operationId: blacklist.get.id
|
---|
129 | # parameters:
|
---|
130 | # - $ref: '#/components/parameters/MarkerIdParameter'
|
---|
131 | # responses:
|
---|
132 | # 200:
|
---|
133 | # description: Single found marker
|
---|
134 | # $ref: '#/components/responses/MarkersBodyOut'
|
---|
135 | # 404:
|
---|
136 | # description: Marker ID not found, errorCode will be 'ID_NOT_FOUND'
|
---|
137 | # $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
138 |
|
---|
139 | post:
|
---|
140 | tags:
|
---|
141 | - Permissions
|
---|
142 | summary: Web modules permission create
|
---|
143 | description: Create or update a web module permission override
|
---|
144 | operationId: WebModules.post.id
|
---|
145 | parameters:
|
---|
146 | - $ref: '#/components/parameters/WebModuleNamePathParameter'
|
---|
147 | requestBody:
|
---|
148 | $ref: '#/components/requestBodies/WebModuleBodyIn'
|
---|
149 | responses:
|
---|
150 | 201:
|
---|
151 | description: Permission override created or updated
|
---|
152 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
153 | 400:
|
---|
154 | description: Invalid request body, errorCode will be one of 'NO_MODULE', 'INVALID_MODULE', 'INVALID_PERMISSION_LEVEL_GLOBAL', 'INVALID_PERMISSION_LEVEL_PER_METHOD_PROPERTY', 'INVALID_METHOD_NAME', 'UNSUPPORTED_METHOD', 'INVALID_PERMISSION_STRING', 'INVALID_PERMISSION_VALUE' or 'INVALID_PERMISSION_VALUE_TYPE'
|
---|
155 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
156 | 403:
|
---|
157 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
158 | security:
|
---|
159 | - apiTokenName: []
|
---|
160 | apiTokenSecret: []
|
---|
161 | - sessionCookie: []
|
---|
162 |
|
---|
163 | delete:
|
---|
164 | tags:
|
---|
165 | - Permissions
|
---|
166 | summary: Web modules permission delete
|
---|
167 | description: Delete a single web module permission override
|
---|
168 | operationId: WebModules.delete.id
|
---|
169 | parameters:
|
---|
170 | - $ref: '#/components/parameters/WebModuleNamePathParameter'
|
---|
171 | responses:
|
---|
172 | 204:
|
---|
173 | description: Deleted permission override
|
---|
174 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
175 | 404:
|
---|
176 | description: Module not found
|
---|
177 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
178 | 403:
|
---|
179 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
180 | security:
|
---|
181 | - apiTokenName: []
|
---|
182 | apiTokenSecret: []
|
---|
183 | - sessionCookie: []
|
---|