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