github.com/w3security/vervet/v5@v5.3.1-0.20230618081846-5bd9b5d799dc/testdata/output/2021-06-01~experimental/spec.yaml (about) 1 # OpenAPI spec generated by vervet, DO NOT EDIT 2 components: 3 headers: 4 DeprecationHeader: 5 description: | 6 A header containing the deprecation date of the underlying endpoint. For more information, please refer to the deprecation header RFC: 7 https://tools.ietf.org/id/draft-dalal-deprecation-header-01.html 8 example: "2021-07-01T00:00:00Z" 9 schema: 10 format: date-time 11 type: string 12 RequestIdResponseHeader: 13 description: | 14 A header containing a unique id used for tracking this request. If you are reporting an issue to W3Security it's very helpful to provide this ID. 15 example: 4b58e274-ec62-4fab-917b-1d2c48d6bdef 16 schema: 17 format: uuid 18 type: string 19 SunsetHeader: 20 description: | 21 A header containing the date of when the underlying endpoint will be removed. This header is only present if the endpoint has been deprecated. Please refer to the RFC for more information: 22 https://datatracker.ietf.org/doc/html/rfc8594 23 example: "2021-08-02T00:00:00Z" 24 schema: 25 format: date-time 26 type: string 27 VersionRequestedResponseHeader: 28 description: 29 A header containing the version of the endpoint requested by the 30 caller. 31 example: "2021-06-04" 32 schema: 33 $ref: "#/components/schemas/QueryVersion" 34 VersionServedResponseHeader: 35 description: 36 A header containing the version of the endpoint that was served 37 by the API. 38 example: "2021-06-04" 39 schema: 40 $ref: "#/components/schemas/ActualVersion" 41 VersionStageResponseHeader: 42 description: | 43 A header containing the version stage of the endpoint. This stage describes the guarantees w3security provides surrounding stability of the endpoint. 44 schema: 45 enum: 46 - wip 47 - experimental 48 - beta 49 - ga 50 - deprecated 51 - sunset 52 example: ga 53 type: string 54 parameters: 55 Pagination: 56 description: 57 The parameters used to paginate through a list of results from 58 the API. 59 in: query 60 name: page 61 schema: 62 additionalProperties: false 63 properties: 64 after: 65 type: string 66 before: 67 type: string 68 size: 69 format: int32 70 type: integer 71 type: object 72 Version: 73 description: The requested version of the endpoint to process the request 74 example: "2021-06-04" 75 in: query 76 name: version 77 required: true 78 schema: 79 $ref: "#/components/schemas/QueryVersion" 80 responses: 81 "400": 82 content: 83 application/vnd.api+json: 84 schema: 85 $ref: "#/components/schemas/ErrorDocument" 86 description: 87 "Bad Request: A parameter provided as a part of the request was 88 invalid." 89 headers: 90 deprecation: 91 $ref: "#/components/headers/DeprecationHeader" 92 w3security-request-id: 93 $ref: "#/components/headers/RequestIdResponseHeader" 94 w3security-version-lifecycle-stage: 95 $ref: "#/components/headers/VersionStageResponseHeader" 96 w3security-version-requested: 97 $ref: "#/components/headers/VersionRequestedResponseHeader" 98 w3security-version-served: 99 $ref: "#/components/headers/VersionServedResponseHeader" 100 sunset: 101 $ref: "#/components/headers/SunsetHeader" 102 "401": 103 content: 104 application/vnd.api+json: 105 schema: 106 $ref: "#/components/schemas/ErrorDocument" 107 description: 108 "Unauthorized: the request requires an authentication token or 109 a token with more permissions." 110 headers: 111 deprecation: 112 $ref: "#/components/headers/DeprecationHeader" 113 w3security-request-id: 114 $ref: "#/components/headers/RequestIdResponseHeader" 115 w3security-version-lifecycle-stage: 116 $ref: "#/components/headers/VersionStageResponseHeader" 117 w3security-version-requested: 118 $ref: "#/components/headers/VersionRequestedResponseHeader" 119 w3security-version-served: 120 $ref: "#/components/headers/VersionServedResponseHeader" 121 sunset: 122 $ref: "#/components/headers/SunsetHeader" 123 "404": 124 content: 125 application/vnd.api+json: 126 schema: 127 $ref: "#/components/schemas/ErrorDocument" 128 description: "Not Found: The resource being operated on could not be found." 129 headers: 130 deprecation: 131 $ref: "#/components/headers/DeprecationHeader" 132 w3security-request-id: 133 $ref: "#/components/headers/RequestIdResponseHeader" 134 w3security-version-lifecycle-stage: 135 $ref: "#/components/headers/VersionStageResponseHeader" 136 w3security-version-requested: 137 $ref: "#/components/headers/VersionRequestedResponseHeader" 138 w3security-version-served: 139 $ref: "#/components/headers/VersionServedResponseHeader" 140 sunset: 141 $ref: "#/components/headers/SunsetHeader" 142 "500": 143 content: 144 application/vnd.api+json: 145 schema: 146 $ref: "#/components/schemas/ErrorDocument" 147 description: 148 "Internal Server Error: An error was encountered while attempting 149 to process the request." 150 headers: 151 deprecation: 152 $ref: "#/components/headers/DeprecationHeader" 153 w3security-request-id: 154 $ref: "#/components/headers/RequestIdResponseHeader" 155 w3security-version-lifecycle-stage: 156 $ref: "#/components/headers/VersionStageResponseHeader" 157 w3security-version-requested: 158 $ref: "#/components/headers/VersionRequestedResponseHeader" 159 w3security-version-served: 160 $ref: "#/components/headers/VersionServedResponseHeader" 161 sunset: 162 $ref: "#/components/headers/SunsetHeader" 163 schemas: 164 ActualVersion: 165 description: Resolved API version 166 pattern: ^((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?)$ 167 type: string 168 Error: 169 additionalProperties: false 170 example: 171 detail: Not Found 172 status: "404" 173 properties: 174 detail: 175 description: 176 A human-readable explanation specific to this occurrence of 177 the problem. 178 example: "The request was missing these required fields: ..." 179 type: string 180 id: 181 description: A unique identifier for this particular occurrence of the problem. 182 example: f16c31b5-6129-4571-add8-d589da9be524 183 format: uuid 184 type: string 185 meta: 186 additionalProperties: true 187 example: 188 key: value 189 type: object 190 source: 191 additionalProperties: false 192 example: 193 pointer: /data/attributes 194 properties: 195 parameter: 196 description: 197 A string indicating which URI query parameter caused the 198 error. 199 example: param1 200 type: string 201 pointer: 202 description: 203 A JSON Pointer [RFC6901] to the associated entity in the 204 request document. 205 example: /data/attributes 206 type: string 207 type: object 208 status: 209 description: 210 The HTTP status code applicable to this problem, expressed 211 as a string value. 212 example: "400" 213 pattern: ^[45]\d\d$ 214 type: string 215 required: 216 - status 217 - detail 218 type: object 219 ErrorDocument: 220 additionalProperties: false 221 example: 222 errors: 223 - detail: Permission denied for this resource 224 status: "403" 225 jsonapi: 226 version: "1.0" 227 properties: 228 errors: 229 example: 230 - detail: Permission denied for this resource 231 status: "403" 232 items: 233 $ref: "#/components/schemas/Error" 234 minItems: 1 235 type: array 236 jsonapi: 237 $ref: "#/components/schemas/JsonApi" 238 required: 239 - jsonapi 240 - errors 241 type: object 242 HelloWorld: 243 additionalProperties: false 244 properties: 245 attributes: 246 additionalProperties: false 247 properties: 248 message: 249 type: string 250 requestSubject: 251 additionalProperties: false 252 properties: 253 clientId: 254 format: uuid 255 type: string 256 publicId: 257 format: uuid 258 type: string 259 type: 260 type: string 261 required: 262 - publicId 263 - type 264 type: object 265 required: 266 - message 267 - requestSubject 268 type: object 269 id: 270 format: uuid 271 type: string 272 type: 273 type: string 274 required: 275 - type 276 - id 277 - attributes 278 type: object 279 JsonApi: 280 additionalProperties: false 281 example: 282 version: "1.0" 283 properties: 284 version: 285 description: Version of the JSON API specification this server supports. 286 example: "1.0" 287 pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)$ 288 type: string 289 required: 290 - version 291 type: object 292 LinkProperty: 293 example: https://example.com/api/resource 294 oneOf: 295 - description: A string containing the link’s URL. 296 example: https://example.com/api/resource 297 type: string 298 - additionalProperties: false 299 example: 300 href: https://example.com/api/resource 301 properties: 302 href: 303 description: A string containing the link’s URL. 304 example: https://example.com/api/resource 305 type: string 306 meta: 307 $ref: "#/components/schemas/Meta" 308 required: 309 - href 310 type: object 311 Links: 312 additionalProperties: false 313 properties: 314 first: 315 $ref: "#/components/schemas/LinkProperty" 316 last: 317 $ref: "#/components/schemas/LinkProperty" 318 next: 319 $ref: "#/components/schemas/LinkProperty" 320 prev: 321 $ref: "#/components/schemas/LinkProperty" 322 related: 323 $ref: "#/components/schemas/LinkProperty" 324 self: 325 $ref: "#/components/schemas/LinkProperty" 326 type: object 327 Meta: 328 additionalProperties: true 329 description: Free-form object that may contain non-standard information. 330 example: 331 key1: value1 332 key2: 333 sub_key: sub_value 334 key3: 335 - array_value1 336 - array_value2 337 type: object 338 QueryVersion: 339 description: Requested API version 340 pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$ 341 type: string 342 info: 343 title: Registry 344 version: 3.0.0 345 openapi: 3.0.3 346 paths: 347 /examples/hello-world/{id}: 348 get: 349 description: Get a single result from the hello-world example 350 operationId: helloWorldGetOne 351 parameters: 352 - $ref: "#/components/parameters/Version" 353 - $ref: "#/components/parameters/Pagination" 354 - description: The id of the hello-world example entity to be retrieved. 355 in: path 356 name: id 357 required: true 358 schema: 359 type: string 360 responses: 361 "200": 362 content: 363 application/vnd.api+json: 364 schema: 365 additionalProperties: false 366 properties: 367 data: 368 $ref: "#/components/schemas/HelloWorld" 369 jsonapi: 370 $ref: "#/components/schemas/JsonApi" 371 links: 372 $ref: "#/components/schemas/Links" 373 required: 374 - jsonapi 375 - data 376 - links 377 type: object 378 description: A hello world entity being requested is returned 379 headers: 380 w3security-request-id: 381 $ref: "#/components/headers/RequestIdResponseHeader" 382 w3security-version-requested: 383 $ref: "#/components/headers/VersionRequestedResponseHeader" 384 w3security-version-served: 385 $ref: "#/components/headers/VersionServedResponseHeader" 386 "400": 387 $ref: "#/components/responses/400" 388 "401": 389 $ref: "#/components/responses/401" 390 "404": 391 $ref: "#/components/responses/404" 392 "500": 393 $ref: "#/components/responses/500" 394 x-w3security-api-releases: 395 - 2021-06-01~experimental 396 - 2021-06-07~experimental 397 - 2021-06-13~beta 398 x-w3security-api-version: 2021-06-01~experimental 399 x-w3security-deprecated-by: 2021-06-07~experimental 400 x-w3security-sunset-eligible: "2021-06-08" 401 x-w3security-api-resource: hello-world 402 /openapi: 403 get: 404 description: List available versions of OpenAPI specification 405 operationId: listAPIVersions 406 responses: 407 "200": 408 content: 409 application/vnd.api+json: 410 schema: 411 items: 412 type: string 413 type: array 414 description: List of available versions is returned 415 headers: 416 w3security-request-id: 417 $ref: "#/components/headers/RequestIdResponseHeader" 418 w3security-version-requested: 419 $ref: "#/components/headers/VersionRequestedResponseHeader" 420 w3security-version-served: 421 $ref: "#/components/headers/VersionServedResponseHeader" 422 "400": 423 $ref: "#/components/responses/400" 424 "401": 425 $ref: "#/components/responses/401" 426 "404": 427 $ref: "#/components/responses/404" 428 "500": 429 $ref: "#/components/responses/500" 430 /openapi/{version}: 431 get: 432 description: Get OpenAPI specification effective at version. 433 operationId: getAPIVersion 434 parameters: 435 - description: The requested version of the API 436 in: path 437 name: version 438 required: true 439 schema: 440 type: string 441 responses: 442 "200": 443 content: 444 application/vnd.api+json: 445 schema: 446 type: object 447 application/x-yaml: 448 schema: 449 type: object 450 description: OpenAPI specification matching requested version is returned 451 headers: 452 w3security-request-id: 453 $ref: "#/components/headers/RequestIdResponseHeader" 454 w3security-version-requested: 455 $ref: "#/components/headers/VersionRequestedResponseHeader" 456 w3security-version-served: 457 $ref: "#/components/headers/VersionServedResponseHeader" 458 "400": 459 $ref: "#/components/responses/400" 460 "401": 461 $ref: "#/components/responses/401" 462 "404": 463 $ref: "#/components/responses/404" 464 "500": 465 $ref: "#/components/responses/500" 466 servers: 467 - description: Test REST API 468 url: https://example.com/api/rest 469 tags: 470 - description: Something 471 name: Something 472 x-w3security-api-lifecycle: sunset 473 x-w3security-api-version: 2021-06-01~experimental