[459] | 1 | openapi: 3.1.0
|
---|
| 2 | info:
|
---|
| 3 | title: Markers
|
---|
| 4 | version: 1
|
---|
| 5 |
|
---|
| 6 | components:
|
---|
| 7 | schemas:
|
---|
| 8 | MarkerId:
|
---|
| 9 | type: string
|
---|
| 10 | format: uuid
|
---|
| 11 | description: Unique identifier of the marker
|
---|
| 12 |
|
---|
| 13 | MarkersElement:
|
---|
| 14 | type: object
|
---|
| 15 | properties:
|
---|
| 16 | id:
|
---|
| 17 | $ref: '#/components/schemas/MarkerId'
|
---|
| 18 | x:
|
---|
| 19 | type: integer
|
---|
| 20 | examples:
|
---|
| 21 | - -57
|
---|
| 22 | y:
|
---|
| 23 | type: integer
|
---|
| 24 | examples:
|
---|
| 25 | - 321
|
---|
| 26 | icon:
|
---|
| 27 | type:
|
---|
| 28 | - string
|
---|
| 29 | - 'null'
|
---|
| 30 | format: uri
|
---|
| 31 | examples:
|
---|
| 32 | - https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Blue_question_mark_icon.svg/1200px-Blue_question_mark_icon.svg.png
|
---|
| 33 | description: Icon used for the marker
|
---|
| 34 | required:
|
---|
| 35 | - id
|
---|
| 36 | - x
|
---|
| 37 | - y
|
---|
| 38 |
|
---|
| 39 | MarkersList:
|
---|
| 40 | type: array
|
---|
| 41 | items:
|
---|
| 42 | $ref: '#/components/schemas/MarkersElement'
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | requestBodies:
|
---|
| 46 | MarkersBodyIn:
|
---|
| 47 | content:
|
---|
| 48 | application/json:
|
---|
| 49 | schema:
|
---|
| 50 | type: object
|
---|
| 51 | properties:
|
---|
| 52 | x:
|
---|
| 53 | type: integer
|
---|
| 54 | examples:
|
---|
| 55 | - -43
|
---|
| 56 | y:
|
---|
| 57 | type: integer
|
---|
| 58 | examples:
|
---|
| 59 | - 842
|
---|
| 60 | icon:
|
---|
| 61 | type: string
|
---|
| 62 | format: uuid
|
---|
| 63 | examples:
|
---|
| 64 | - https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Blue_question_mark_icon.svg/1200px-Blue_question_mark_icon.svg.png
|
---|
| 65 | required:
|
---|
| 66 | - x
|
---|
| 67 | - y
|
---|
| 68 | required: true
|
---|
| 69 |
|
---|
| 70 |
|
---|
| 71 | responses:
|
---|
| 72 | MarkersBodyOut:
|
---|
| 73 | description: Found marker
|
---|
| 74 | content:
|
---|
| 75 | application/json:
|
---|
| 76 | schema:
|
---|
| 77 | type: object
|
---|
| 78 | properties:
|
---|
| 79 | data:
|
---|
| 80 | $ref: '#/components/schemas/MarkersList'
|
---|
| 81 | meta:
|
---|
| 82 | $ref: '#/components/schemas/ResultEnvelopeMeta'
|
---|
| 83 | required:
|
---|
| 84 | - data
|
---|
| 85 | - meta
|
---|
| 86 |
|
---|
| 87 | MarkersIdOut:
|
---|
| 88 | description: Created marker's ID
|
---|
| 89 | content:
|
---|
| 90 | application/json:
|
---|
| 91 | schema:
|
---|
| 92 | type: object
|
---|
| 93 | properties:
|
---|
| 94 | data:
|
---|
| 95 | type: string
|
---|
| 96 | format: uuid
|
---|
| 97 | meta:
|
---|
| 98 | $ref: '#/components/schemas/ResultEnvelopeMeta'
|
---|
| 99 | required:
|
---|
| 100 | - data
|
---|
| 101 | - meta
|
---|
| 102 |
|
---|
| 103 |
|
---|
| 104 | parameters:
|
---|
| 105 | MarkerIdParameter:
|
---|
| 106 | name: id
|
---|
| 107 | in: path
|
---|
| 108 | required: true
|
---|
| 109 | schema:
|
---|
| 110 | type: string
|
---|
| 111 | format: uuid
|
---|
| 112 |
|
---|
| 113 |
|
---|
| 114 | paths:
|
---|
| 115 | /api/markers:
|
---|
| 116 | get:
|
---|
| 117 | tags:
|
---|
| 118 | - Map
|
---|
| 119 | summary: Markers list
|
---|
| 120 | description: Fetch a list of the all defined map markers
|
---|
| 121 | operationId: markers.get
|
---|
| 122 | responses:
|
---|
| 123 | 200:
|
---|
| 124 | description: List of found markers
|
---|
| 125 | $ref: '#/components/responses/MarkersBodyOut'
|
---|
| 126 |
|
---|
| 127 | post:
|
---|
| 128 | tags:
|
---|
| 129 | - Map
|
---|
| 130 | summary: Marker create
|
---|
| 131 | description: Create a new map marker
|
---|
| 132 | operationId: markers.post
|
---|
| 133 | requestBody:
|
---|
| 134 | $ref: '#/components/requestBodies/MarkersBodyIn'
|
---|
| 135 | responses:
|
---|
| 136 | 201:
|
---|
| 137 | description: Marker with updated values
|
---|
| 138 | $ref: '#/components/responses/MarkersIdOut'
|
---|
| 139 | 400:
|
---|
| 140 | description: >-
|
---|
| 141 | Invalid request body, errorCode will be one of 'NO_OR_INVALID_X',
|
---|
| 142 | 'NO_OR_INVALID_Y'
|
---|
| 143 | $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
| 144 | 403:
|
---|
| 145 | $ref: '#/components/responses/Unauthorized'
|
---|
| 146 | security:
|
---|
| 147 | - apiTokenName: []
|
---|
| 148 | apiTokenSecret: []
|
---|
| 149 | - sessionCookie: []
|
---|
| 150 |
|
---|
| 151 | /api/markers/{id}:
|
---|
| 152 | get:
|
---|
| 153 | tags:
|
---|
| 154 | - Map
|
---|
| 155 | summary: Marker show
|
---|
| 156 | description: Fetch a single defined map marker
|
---|
| 157 | operationId: markers.get.id
|
---|
| 158 | parameters:
|
---|
| 159 | - $ref: '#/components/parameters/MarkerIdParameter'
|
---|
| 160 | responses:
|
---|
| 161 | 200:
|
---|
| 162 | description: Single found marker
|
---|
| 163 | $ref: '#/components/responses/MarkersBodyOut'
|
---|
| 164 | 404:
|
---|
| 165 | description: Marker ID not found, errorCode will be 'ID_NOT_FOUND'
|
---|
| 166 | $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
| 167 |
|
---|
| 168 | put:
|
---|
| 169 | tags:
|
---|
| 170 | - Map
|
---|
| 171 | summary: Marker update
|
---|
| 172 | description: Update a single defined map marker
|
---|
| 173 | operationId: markers.put.id
|
---|
| 174 | parameters:
|
---|
| 175 | - $ref: '#/components/parameters/MarkerIdParameter'
|
---|
| 176 | requestBody:
|
---|
| 177 | $ref: '#/components/requestBodies/MarkersBodyIn'
|
---|
| 178 | responses:
|
---|
| 179 | 200:
|
---|
| 180 | description: Marker with updated values
|
---|
| 181 | $ref: '#/components/responses/MarkersBodyOut'
|
---|
| 182 | 400:
|
---|
| 183 | description: >-
|
---|
| 184 | Invalid request body, errorCode will be one of 'NO_OR_INVALID_X',
|
---|
| 185 | 'NO_OR_INVALID_Y'
|
---|
| 186 | $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
| 187 | 404:
|
---|
| 188 | description: Marker ID not found, errorCode will be 'ID_NOT_FOUND'
|
---|
| 189 | $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
| 190 | 403:
|
---|
| 191 | $ref: '#/components/responses/Unauthorized'
|
---|
| 192 | security:
|
---|
| 193 | - apiTokenName: []
|
---|
| 194 | apiTokenSecret: []
|
---|
| 195 | - sessionCookie: []
|
---|
| 196 |
|
---|
| 197 | delete:
|
---|
| 198 | tags:
|
---|
| 199 | - Map
|
---|
| 200 | summary: Marker delete
|
---|
| 201 | description: Delete a single defined map marker
|
---|
| 202 | operationId: markers.delete.id
|
---|
| 203 | parameters:
|
---|
| 204 | - $ref: '#/components/parameters/MarkerIdParameter'
|
---|
| 205 | responses:
|
---|
| 206 | 204:
|
---|
| 207 | description: Deleted marker
|
---|
| 208 | $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
| 209 | 404:
|
---|
| 210 | description: Marker ID not found
|
---|
| 211 | $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
|
---|
| 212 | 403:
|
---|
| 213 | $ref: '#/components/responses/Unauthorized'
|
---|
| 214 | security:
|
---|
| 215 | - apiTokenName: []
|
---|
| 216 | apiTokenSecret: []
|
---|
| 217 | - sessionCookie: []
|
---|