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