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