| 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 | secret:
|
|---|
| 62 | string
|
|---|
| 63 | permissionLevel:
|
|---|
| 64 | type: integer
|
|---|
| 65 | required:
|
|---|
| 66 | - secret
|
|---|
| 67 | - permissionLevel
|
|---|
| 68 | required: true
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | parameters:
|
|---|
| 72 | WebModuleNamePathParameter:
|
|---|
| 73 | name: moduleName
|
|---|
| 74 | in: path
|
|---|
| 75 | required: true
|
|---|
| 76 | schema:
|
|---|
| 77 | $ref: '#/components/schemas/TypeWebModuleName'
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 | paths:
|
|---|
| 81 | /api/webmodules:
|
|---|
| 82 | get:
|
|---|
| 83 | tags:
|
|---|
| 84 | - Permissions
|
|---|
| 85 | summary: Web modules permission list
|
|---|
| 86 | description: Fetch a list of all web module permissions
|
|---|
| 87 | operationId: WebModules.get
|
|---|
| 88 | responses:
|
|---|
| 89 | 200:
|
|---|
| 90 | description: List of web modules
|
|---|
| 91 | content:
|
|---|
| 92 | application/json:
|
|---|
| 93 | schema:
|
|---|
| 94 | type: object
|
|---|
| 95 | properties:
|
|---|
| 96 | data:
|
|---|
| 97 | $ref: '#/components/schemas/WebModuleList'
|
|---|
| 98 | meta:
|
|---|
| 99 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
|---|
| 100 | required:
|
|---|
| 101 | - data
|
|---|
| 102 | - meta
|
|---|
| 103 | 403:
|
|---|
| 104 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
|---|
| 105 | security:
|
|---|
| 106 | - apiTokenName: [ ]
|
|---|
| 107 | apiTokenSecret: [ ]
|
|---|
| 108 | - sessionCookie: [ ]
|
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 | /api/webmodules/{moduleName}:
|
|---|
| 112 | # get:
|
|---|
| 113 | # tags:
|
|---|
| 114 | # - Permissions
|
|---|
| 115 | # summary: Marker show
|
|---|
| 116 | # description: Fetch a single defined map marker
|
|---|
| 117 | # operationId: blacklist.get.id
|
|---|
| 118 | # parameters:
|
|---|
| 119 | # - $ref: '#/components/parameters/MarkerIdParameter'
|
|---|
| 120 | # responses:
|
|---|
| 121 | # 200:
|
|---|
| 122 | # description: Single found marker
|
|---|
| 123 | # $ref: '#/components/responses/MarkersBodyOut'
|
|---|
| 124 | # 404:
|
|---|
| 125 | # description: Marker ID not found, errorCode will be 'ID_NOT_FOUND'
|
|---|
| 126 | # $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
|---|
| 127 |
|
|---|
| 128 | post:
|
|---|
| 129 | tags:
|
|---|
| 130 | - Permissions
|
|---|
| 131 | summary: Web modules permission create
|
|---|
| 132 | description: Create or update a web module permission override
|
|---|
| 133 | operationId: WebModules.post.id
|
|---|
| 134 | parameters:
|
|---|
| 135 | - $ref: '#/components/parameters/WebModuleNamePathParameter'
|
|---|
| 136 | requestBody:
|
|---|
| 137 | $ref: '#/components/requestBodies/WebModuleBodyIn'
|
|---|
| 138 | responses:
|
|---|
| 139 | 201:
|
|---|
| 140 | description: Permission override created or updated
|
|---|
| 141 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
|---|
| 142 | 400:
|
|---|
| 143 | 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'
|
|---|
| 144 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
|---|
| 145 | 403:
|
|---|
| 146 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
|---|
| 147 | security:
|
|---|
| 148 | - apiTokenName: []
|
|---|
| 149 | apiTokenSecret: []
|
|---|
| 150 | - sessionCookie: []
|
|---|
| 151 |
|
|---|
| 152 | delete:
|
|---|
| 153 | tags:
|
|---|
| 154 | - Permissions
|
|---|
| 155 | summary: Web modules permission delete
|
|---|
| 156 | description: Delete a single web module permission override
|
|---|
| 157 | operationId: WebModules.delete.id
|
|---|
| 158 | parameters:
|
|---|
| 159 | - $ref: '#/components/parameters/WebModuleNamePathParameter'
|
|---|
| 160 | responses:
|
|---|
| 161 | 204:
|
|---|
| 162 | description: Deleted permission override
|
|---|
| 163 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
|---|
| 164 | 404:
|
|---|
| 165 | description: Module not found
|
|---|
| 166 | $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
|
|---|
| 167 | 403:
|
|---|
| 168 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
|---|
| 169 | security:
|
|---|
| 170 | - apiTokenName: []
|
|---|
| 171 | apiTokenSecret: []
|
|---|
| 172 | - sessionCookie: []
|
|---|