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