github.com/w3security/vervet/v5@v5.3.1-0.20230618081846-5bd9b5d799dc/testdata/output/2021-08-20~beta/spec.json (about)

     1  {
     2    "components": {
     3      "headers": {
     4        "DeprecationHeader": {
     5          "description": "A header containing the deprecation date of the underlying endpoint. For more information, please refer to the deprecation header RFC:\nhttps://tools.ietf.org/id/draft-dalal-deprecation-header-01.html\n",
     6          "example": "2021-07-01T00:00:00Z",
     7          "schema": {
     8            "format": "date-time",
     9            "type": "string"
    10          }
    11        },
    12        "LocationHeader": {
    13          "description": "A header providing a URL for the location of a resource\n",
    14          "example": "https://example.com/resource/4",
    15          "schema": {
    16            "format": "url",
    17            "type": "string"
    18          }
    19        },
    20        "RequestIdResponseHeader": {
    21          "description": "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.\n",
    22          "example": "4b58e274-ec62-4fab-917b-1d2c48d6bdef",
    23          "schema": {
    24            "format": "uuid",
    25            "type": "string"
    26          }
    27        },
    28        "SunsetHeader": {
    29          "description": "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:\nhttps://datatracker.ietf.org/doc/html/rfc8594\n",
    30          "example": "2021-08-02T00:00:00Z",
    31          "schema": {
    32            "format": "date-time",
    33            "type": "string"
    34          }
    35        },
    36        "VersionRequestedResponseHeader": {
    37          "description": "A header containing the version of the endpoint requested by the caller.",
    38          "example": "2021-06-04",
    39          "schema": {
    40            "$ref": "#/components/schemas/QueryVersion"
    41          }
    42        },
    43        "VersionServedResponseHeader": {
    44          "description": "A header containing the version of the endpoint that was served by the API.",
    45          "example": "2021-06-04",
    46          "schema": {
    47            "$ref": "#/components/schemas/ActualVersion"
    48          }
    49        },
    50        "VersionStageResponseHeader": {
    51          "description": "A header containing the version stage of the endpoint. This stage describes the guarantees w3security provides surrounding stability of the endpoint.\n",
    52          "schema": {
    53            "enum": [
    54              "wip",
    55              "experimental",
    56              "beta",
    57              "ga",
    58              "deprecated",
    59              "sunset"
    60            ],
    61            "example": "ga",
    62            "type": "string"
    63          }
    64        }
    65      },
    66      "parameters": {
    67        "Pagination": {
    68          "description": "The parameters used to paginate through a list of results from the API.",
    69          "in": "query",
    70          "name": "page",
    71          "schema": {
    72            "additionalProperties": false,
    73            "properties": {
    74              "after": {
    75                "type": "string"
    76              },
    77              "before": {
    78                "type": "string"
    79              },
    80              "size": {
    81                "format": "int32",
    82                "type": "integer"
    83              }
    84            },
    85            "type": "object"
    86          }
    87        },
    88        "Version": {
    89          "description": "The requested version of the endpoint to process the request",
    90          "example": "2021-06-04",
    91          "in": "query",
    92          "name": "version",
    93          "required": true,
    94          "schema": {
    95            "$ref": "#/components/schemas/QueryVersion"
    96          }
    97        }
    98      },
    99      "responses": {
   100        "400": {
   101          "content": {
   102            "application/vnd.api+json": {
   103              "schema": {
   104                "$ref": "#/components/schemas/ErrorDocument"
   105              }
   106            }
   107          },
   108          "description": "Bad Request: A parameter provided as a part of the request was invalid.",
   109          "headers": {
   110            "deprecation": {
   111              "$ref": "#/components/headers/DeprecationHeader"
   112            },
   113            "w3security-request-id": {
   114              "$ref": "#/components/headers/RequestIdResponseHeader"
   115            },
   116            "w3security-version-lifecycle-stage": {
   117              "$ref": "#/components/headers/VersionStageResponseHeader"
   118            },
   119            "w3security-version-requested": {
   120              "$ref": "#/components/headers/VersionRequestedResponseHeader"
   121            },
   122            "w3security-version-served": {
   123              "$ref": "#/components/headers/VersionServedResponseHeader"
   124            },
   125            "sunset": {
   126              "$ref": "#/components/headers/SunsetHeader"
   127            }
   128          }
   129        },
   130        "401": {
   131          "content": {
   132            "application/vnd.api+json": {
   133              "schema": {
   134                "$ref": "#/components/schemas/ErrorDocument"
   135              }
   136            }
   137          },
   138          "description": "Unauthorized: the request requires an authentication token or a token with more permissions.",
   139          "headers": {
   140            "deprecation": {
   141              "$ref": "#/components/headers/DeprecationHeader"
   142            },
   143            "w3security-request-id": {
   144              "$ref": "#/components/headers/RequestIdResponseHeader"
   145            },
   146            "w3security-version-lifecycle-stage": {
   147              "$ref": "#/components/headers/VersionStageResponseHeader"
   148            },
   149            "w3security-version-requested": {
   150              "$ref": "#/components/headers/VersionRequestedResponseHeader"
   151            },
   152            "w3security-version-served": {
   153              "$ref": "#/components/headers/VersionServedResponseHeader"
   154            },
   155            "sunset": {
   156              "$ref": "#/components/headers/SunsetHeader"
   157            }
   158          }
   159        },
   160        "404": {
   161          "content": {
   162            "application/vnd.api+json": {
   163              "schema": {
   164                "$ref": "#/components/schemas/ErrorDocument"
   165              }
   166            }
   167          },
   168          "description": "Not Found: The resource being operated on could not be found.",
   169          "headers": {
   170            "deprecation": {
   171              "$ref": "#/components/headers/DeprecationHeader"
   172            },
   173            "w3security-request-id": {
   174              "$ref": "#/components/headers/RequestIdResponseHeader"
   175            },
   176            "w3security-version-lifecycle-stage": {
   177              "$ref": "#/components/headers/VersionStageResponseHeader"
   178            },
   179            "w3security-version-requested": {
   180              "$ref": "#/components/headers/VersionRequestedResponseHeader"
   181            },
   182            "w3security-version-served": {
   183              "$ref": "#/components/headers/VersionServedResponseHeader"
   184            },
   185            "sunset": {
   186              "$ref": "#/components/headers/SunsetHeader"
   187            }
   188          }
   189        },
   190        "500": {
   191          "content": {
   192            "application/vnd.api+json": {
   193              "schema": {
   194                "$ref": "#/components/schemas/ErrorDocument"
   195              }
   196            }
   197          },
   198          "description": "Internal Server Error: An error was encountered while attempting to process the request.",
   199          "headers": {
   200            "deprecation": {
   201              "$ref": "#/components/headers/DeprecationHeader"
   202            },
   203            "w3security-request-id": {
   204              "$ref": "#/components/headers/RequestIdResponseHeader"
   205            },
   206            "w3security-version-lifecycle-stage": {
   207              "$ref": "#/components/headers/VersionStageResponseHeader"
   208            },
   209            "w3security-version-requested": {
   210              "$ref": "#/components/headers/VersionRequestedResponseHeader"
   211            },
   212            "w3security-version-served": {
   213              "$ref": "#/components/headers/VersionServedResponseHeader"
   214            },
   215            "sunset": {
   216              "$ref": "#/components/headers/SunsetHeader"
   217            }
   218          }
   219        }
   220      },
   221      "schemas": {
   222        "ActualVersion": {
   223          "description": "Resolved API version",
   224          "pattern": "^((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?)$",
   225          "type": "string"
   226        },
   227        "Error": {
   228          "additionalProperties": false,
   229          "example": {
   230            "detail": "Not Found",
   231            "status": "404"
   232          },
   233          "properties": {
   234            "detail": {
   235              "description": "A human-readable explanation specific to this occurrence of the problem.",
   236              "example": "The request was missing these required fields: ...",
   237              "type": "string"
   238            },
   239            "id": {
   240              "description": "A unique identifier for this particular occurrence of the problem.",
   241              "example": "f16c31b5-6129-4571-add8-d589da9be524",
   242              "format": "uuid",
   243              "type": "string"
   244            },
   245            "meta": {
   246              "additionalProperties": true,
   247              "example": {
   248                "key": "value"
   249              },
   250              "type": "object"
   251            },
   252            "source": {
   253              "additionalProperties": false,
   254              "example": {
   255                "pointer": "/data/attributes"
   256              },
   257              "properties": {
   258                "parameter": {
   259                  "description": "A string indicating which URI query parameter caused the error.",
   260                  "example": "param1",
   261                  "type": "string"
   262                },
   263                "pointer": {
   264                  "description": "A JSON Pointer [RFC6901] to the associated entity in the request document.",
   265                  "example": "/data/attributes",
   266                  "type": "string"
   267                }
   268              },
   269              "type": "object"
   270            },
   271            "status": {
   272              "description": "The HTTP status code applicable to this problem, expressed as a string value.",
   273              "example": "400",
   274              "pattern": "^[45]\\d\\d$",
   275              "type": "string"
   276            }
   277          },
   278          "required": [
   279            "status",
   280            "detail"
   281          ],
   282          "type": "object"
   283        },
   284        "ErrorDocument": {
   285          "additionalProperties": false,
   286          "example": {
   287            "errors": [
   288              {
   289                "detail": "Permission denied for this resource",
   290                "status": "403"
   291              }
   292            ],
   293            "jsonapi": {
   294              "version": "1.0"
   295            }
   296          },
   297          "properties": {
   298            "errors": {
   299              "example": [
   300                {
   301                  "detail": "Permission denied for this resource",
   302                  "status": "403"
   303                }
   304              ],
   305              "items": {
   306                "$ref": "#/components/schemas/Error"
   307              },
   308              "minItems": 1,
   309              "type": "array"
   310            },
   311            "jsonapi": {
   312              "$ref": "#/components/schemas/JsonApi"
   313            }
   314          },
   315          "required": [
   316            "jsonapi",
   317            "errors"
   318          ],
   319          "type": "object"
   320        },
   321        "HelloWorld": {
   322          "additionalProperties": false,
   323          "properties": {
   324            "attributes": {
   325              "additionalProperties": false,
   326              "properties": {
   327                "message": {
   328                  "type": "string"
   329                },
   330                "requestSubject": {
   331                  "additionalProperties": false,
   332                  "properties": {
   333                    "clientId": {
   334                      "format": "uuid",
   335                      "type": "string"
   336                    },
   337                    "publicId": {
   338                      "format": "uuid",
   339                      "type": "string"
   340                    },
   341                    "type": {
   342                      "type": "string"
   343                    }
   344                  },
   345                  "required": [
   346                    "publicId",
   347                    "type"
   348                  ],
   349                  "type": "object"
   350                }
   351              },
   352              "required": [
   353                "message",
   354                "requestSubject"
   355              ],
   356              "type": "object"
   357            },
   358            "id": {
   359              "format": "uuid",
   360              "type": "string"
   361            },
   362            "type": {
   363              "type": "string"
   364            }
   365          },
   366          "required": [
   367            "type",
   368            "id",
   369            "attributes"
   370          ],
   371          "type": "object"
   372        },
   373        "JsonApi": {
   374          "additionalProperties": false,
   375          "example": {
   376            "version": "1.0"
   377          },
   378          "properties": {
   379            "version": {
   380              "description": "Version of the JSON API specification this server supports.",
   381              "example": "1.0",
   382              "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
   383              "type": "string"
   384            }
   385          },
   386          "required": [
   387            "version"
   388          ],
   389          "type": "object"
   390        },
   391        "LinkProperty": {
   392          "example": "https://example.com/api/resource",
   393          "oneOf": [
   394            {
   395              "description": "A string containing the link’s URL.",
   396              "example": "https://example.com/api/resource",
   397              "type": "string"
   398            },
   399            {
   400              "additionalProperties": false,
   401              "example": {
   402                "href": "https://example.com/api/resource"
   403              },
   404              "properties": {
   405                "href": {
   406                  "description": "A string containing the link’s URL.",
   407                  "example": "https://example.com/api/resource",
   408                  "type": "string"
   409                },
   410                "meta": {
   411                  "$ref": "#/components/schemas/Meta"
   412                }
   413              },
   414              "required": [
   415                "href"
   416              ],
   417              "type": "object"
   418            }
   419          ]
   420        },
   421        "Links": {
   422          "additionalProperties": false,
   423          "properties": {
   424            "first": {
   425              "$ref": "#/components/schemas/LinkProperty"
   426            },
   427            "last": {
   428              "$ref": "#/components/schemas/LinkProperty"
   429            },
   430            "next": {
   431              "$ref": "#/components/schemas/LinkProperty"
   432            },
   433            "prev": {
   434              "$ref": "#/components/schemas/LinkProperty"
   435            },
   436            "related": {
   437              "$ref": "#/components/schemas/LinkProperty"
   438            },
   439            "self": {
   440              "$ref": "#/components/schemas/LinkProperty"
   441            }
   442          },
   443          "type": "object"
   444        },
   445        "Meta": {
   446          "additionalProperties": true,
   447          "description": "Free-form object that may contain non-standard information.",
   448          "example": {
   449            "key1": "value1",
   450            "key2": {
   451              "sub_key": "sub_value"
   452            },
   453            "key3": [
   454              "array_value1",
   455              "array_value2"
   456            ]
   457          },
   458          "type": "object"
   459        },
   460        "QueryVersion": {
   461          "description": "Requested API version",
   462          "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))?))$",
   463          "type": "string"
   464        }
   465      }
   466    },
   467    "info": {
   468      "title": "Registry",
   469      "version": "3.0.0"
   470    },
   471    "openapi": "3.0.3",
   472    "paths": {
   473      "/examples/hello-world": {
   474        "post": {
   475          "description": "Create a single result from the hello-world example",
   476          "operationId": "helloWorldCreate",
   477          "parameters": [
   478            {
   479              "$ref": "#/components/parameters/Version"
   480            }
   481          ],
   482          "requestBody": {
   483            "content": {
   484              "application/vnd.api+json": {
   485                "schema": {
   486                  "additionalProperties": false,
   487                  "properties": {
   488                    "attributes": {
   489                      "additionalProperties": false,
   490                      "properties": {
   491                        "betaField": {
   492                          "type": "string"
   493                        },
   494                        "message": {
   495                          "type": "string"
   496                        }
   497                      },
   498                      "required": [
   499                        "message",
   500                        "betaField"
   501                      ],
   502                      "type": "object"
   503                    }
   504                  },
   505                  "required": [
   506                    "attributes"
   507                  ],
   508                  "type": "object"
   509                }
   510              }
   511            }
   512          },
   513          "responses": {
   514            "201": {
   515              "content": {
   516                "application/vnd.api+json": {
   517                  "schema": {
   518                    "additionalProperties": false,
   519                    "properties": {
   520                      "data": {
   521                        "$ref": "#/components/schemas/HelloWorld"
   522                      },
   523                      "jsonapi": {
   524                        "$ref": "#/components/schemas/JsonApi"
   525                      },
   526                      "links": {
   527                        "$ref": "#/components/schemas/Links"
   528                      }
   529                    },
   530                    "required": [
   531                      "jsonapi",
   532                      "data",
   533                      "links"
   534                    ],
   535                    "type": "object"
   536                  }
   537                }
   538              },
   539              "description": "A hello world entity being requested is returned",
   540              "headers": {
   541                "location": {
   542                  "$ref": "#/components/headers/LocationHeader"
   543                },
   544                "w3security-request-id": {
   545                  "$ref": "#/components/headers/RequestIdResponseHeader"
   546                },
   547                "w3security-version-requested": {
   548                  "$ref": "#/components/headers/VersionRequestedResponseHeader"
   549                },
   550                "w3security-version-served": {
   551                  "$ref": "#/components/headers/VersionServedResponseHeader"
   552                }
   553              }
   554            },
   555            "400": {
   556              "$ref": "#/components/responses/400"
   557            },
   558            "401": {
   559              "$ref": "#/components/responses/401"
   560            },
   561            "404": {
   562              "$ref": "#/components/responses/404"
   563            },
   564            "500": {
   565              "$ref": "#/components/responses/500"
   566            }
   567          },
   568          "x-w3security-api-releases": [
   569            "2021-06-13~beta"
   570          ],
   571          "x-w3security-api-version": "2021-06-13~beta"
   572        },
   573        "x-w3security-api-resource": "hello-world"
   574      },
   575      "/examples/hello-world/{id}": {
   576        "get": {
   577          "description": "Get a single result from the hello-world example",
   578          "operationId": "helloWorldGetOne",
   579          "parameters": [
   580            {
   581              "$ref": "#/components/parameters/Version"
   582            },
   583            {
   584              "$ref": "#/components/parameters/Pagination"
   585            },
   586            {
   587              "description": "The id of the hello-world example entity to be retrieved.",
   588              "in": "path",
   589              "name": "id",
   590              "required": true,
   591              "schema": {
   592                "type": "string"
   593              }
   594            }
   595          ],
   596          "responses": {
   597            "200": {
   598              "content": {
   599                "application/vnd.api+json": {
   600                  "schema": {
   601                    "additionalProperties": false,
   602                    "properties": {
   603                      "data": {
   604                        "$ref": "#/components/schemas/HelloWorld"
   605                      },
   606                      "jsonapi": {
   607                        "$ref": "#/components/schemas/JsonApi"
   608                      },
   609                      "links": {
   610                        "$ref": "#/components/schemas/Links"
   611                      }
   612                    },
   613                    "required": [
   614                      "jsonapi",
   615                      "data",
   616                      "links"
   617                    ],
   618                    "type": "object"
   619                  }
   620                }
   621              },
   622              "description": "A hello world entity being requested is returned",
   623              "headers": {
   624                "w3security-request-id": {
   625                  "$ref": "#/components/headers/RequestIdResponseHeader"
   626                },
   627                "w3security-version-requested": {
   628                  "$ref": "#/components/headers/VersionRequestedResponseHeader"
   629                },
   630                "w3security-version-served": {
   631                  "$ref": "#/components/headers/VersionServedResponseHeader"
   632                }
   633              }
   634            },
   635            "400": {
   636              "$ref": "#/components/responses/400"
   637            },
   638            "401": {
   639              "$ref": "#/components/responses/401"
   640            },
   641            "404": {
   642              "$ref": "#/components/responses/404"
   643            },
   644            "500": {
   645              "$ref": "#/components/responses/500"
   646            }
   647          },
   648          "x-w3security-api-releases": [
   649            "2021-06-01~experimental",
   650            "2021-06-07~experimental",
   651            "2021-06-13~beta"
   652          ],
   653          "x-w3security-api-version": "2021-06-13~beta"
   654        },
   655        "x-w3security-api-resource": "hello-world"
   656      },
   657      "/openapi": {
   658        "get": {
   659          "description": "List available versions of OpenAPI specification",
   660          "operationId": "listAPIVersions",
   661          "responses": {
   662            "200": {
   663              "content": {
   664                "application/vnd.api+json": {
   665                  "schema": {
   666                    "items": {
   667                      "type": "string"
   668                    },
   669                    "type": "array"
   670                  }
   671                }
   672              },
   673              "description": "List of available versions is returned",
   674              "headers": {
   675                "w3security-request-id": {
   676                  "$ref": "#/components/headers/RequestIdResponseHeader"
   677                },
   678                "w3security-version-requested": {
   679                  "$ref": "#/components/headers/VersionRequestedResponseHeader"
   680                },
   681                "w3security-version-served": {
   682                  "$ref": "#/components/headers/VersionServedResponseHeader"
   683                }
   684              }
   685            },
   686            "400": {
   687              "$ref": "#/components/responses/400"
   688            },
   689            "401": {
   690              "$ref": "#/components/responses/401"
   691            },
   692            "404": {
   693              "$ref": "#/components/responses/404"
   694            },
   695            "500": {
   696              "$ref": "#/components/responses/500"
   697            }
   698          }
   699        }
   700      },
   701      "/openapi/{version}": {
   702        "get": {
   703          "description": "Get OpenAPI specification effective at version.",
   704          "operationId": "getAPIVersion",
   705          "parameters": [
   706            {
   707              "description": "The requested version of the API",
   708              "in": "path",
   709              "name": "version",
   710              "required": true,
   711              "schema": {
   712                "type": "string"
   713              }
   714            }
   715          ],
   716          "responses": {
   717            "200": {
   718              "content": {
   719                "application/vnd.api+json": {
   720                  "schema": {
   721                    "type": "object"
   722                  }
   723                },
   724                "application/x-yaml": {
   725                  "schema": {
   726                    "type": "object"
   727                  }
   728                }
   729              },
   730              "description": "OpenAPI specification matching requested version is returned",
   731              "headers": {
   732                "w3security-request-id": {
   733                  "$ref": "#/components/headers/RequestIdResponseHeader"
   734                },
   735                "w3security-version-requested": {
   736                  "$ref": "#/components/headers/VersionRequestedResponseHeader"
   737                },
   738                "w3security-version-served": {
   739                  "$ref": "#/components/headers/VersionServedResponseHeader"
   740                }
   741              }
   742            },
   743            "400": {
   744              "$ref": "#/components/responses/400"
   745            },
   746            "401": {
   747              "$ref": "#/components/responses/401"
   748            },
   749            "404": {
   750              "$ref": "#/components/responses/404"
   751            },
   752            "500": {
   753              "$ref": "#/components/responses/500"
   754            }
   755          }
   756        }
   757      }
   758    },
   759    "servers": [
   760      {
   761        "description": "Test REST API",
   762        "url": "https://example.com/api/rest"
   763      }
   764    ],
   765    "tags": [
   766      {
   767        "description": "Something",
   768        "name": "Something"
   769      }
   770    ],
   771    "x-w3security-api-lifecycle": "released",
   772    "x-w3security-api-version": "2021-08-20~beta"
   773  }