github.com/snyk/vervet/v5@v5.11.1-0.20240202085829-ad4dd7fb6101/testdata/resources/_examples/hello-world/2021-06-13/spec.yaml (about)

     1  openapi: 3.0.3
     2  x-snyk-api-stability: beta
     3  info:
     4    title: Registry
     5    version: 3.0.0
     6  servers:
     7    - url: /api/v3
     8      description: Snyk Registry
     9  tags:
    10    - name: Something
    11      description: Something
    12  paths:
    13    /examples/hello-world:
    14      post:
    15        description: Create a single result from the hello-world example
    16        operationId: helloWorldCreate
    17        parameters:
    18          - { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/parameters/version.yaml#/Version' }
    19        requestBody:
    20          content:
    21            application/vnd.api+json:
    22              schema:
    23                type: object
    24                properties:
    25                  attributes:
    26                    type: object
    27                    properties:
    28                      message:
    29                        type: string
    30                      betaField: 
    31                        type: string
    32                    additionalProperties: false
    33                    required: [ 'message', 'betaField' ]
    34                additionalProperties: false
    35                required: ['attributes']
    36        responses:
    37          '400': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/400.yaml#/400' }
    38          '401': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/401.yaml#/401' }
    39          '404': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/404.yaml#/404' }
    40          '500': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/500.yaml#/500' }
    41          '201':
    42            description: 'A hello world entity being requested is returned'
    43            x-snyk-include-headers: { $ref: '../../../schemas/headers/common-response.yaml#/Common' }
    44            headers:
    45              #snyk-version-requested: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/VersionRequestedResponseHeader' }
    46              #snyk-version-served: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/VersionServedResponseHeader' }
    47              #snyk-request-id: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/RequestIdResponseHeader' }
    48              location: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/LocationHeader' }
    49            content:
    50              application/vnd.api+json:
    51                schema:
    52                  type: object
    53                  properties:
    54                    jsonapi: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/common.yaml#/JsonApi' }
    55                    links: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/common.yaml#/Links' }
    56                    data: { $ref: '#/components/schemas/HelloWorld'}
    57                  required: ['jsonapi', 'data', 'links']
    58                  additionalProperties: false
    59  
    60    /examples/hello-world/{id}:
    61      get:
    62        description: Get a single result from the hello-world example
    63        operationId: helloWorldGetOne
    64        parameters:
    65          - { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/parameters/version.yaml#/Version' }
    66          - { $ref: '../../../schemas/parameters/pagination.yaml#/Pagination' }
    67          - name: id
    68            description: The id of the hello-world example entity to be retrieved.
    69            in: path
    70            required: true
    71            schema:
    72              type: string
    73        responses:
    74          '400': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/400.yaml#/400' }
    75          '401': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/401.yaml#/401' }
    76          '404': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/404.yaml#/404' }
    77          '500': { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/responses/500.yaml#/500' }
    78          '200':
    79            description: 'A hello world entity being requested is returned'
    80            headers:
    81              snyk-version-requested: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/VersionRequestedResponseHeader' }
    82              snyk-version-served: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/VersionServedResponseHeader' }
    83              snyk-request-id: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/headers/headers.yaml#/RequestIdResponseHeader' }
    84            content:
    85              application/vnd.api+json:
    86                schema:
    87                  type: object
    88                  properties:
    89                    jsonapi: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/common.yaml#/JsonApi' }
    90                    links: { $ref: 'https://raw.githubusercontent.com/snyk/sweater-comb/v1.2.2/components/common.yaml#/Links' }
    91                    data: { $ref: '#/components/schemas/HelloWorld'}
    92                  required: ['jsonapi', 'data', 'links']
    93                  additionalProperties: false
    94  
    95  components:
    96    schemas:
    97      HelloWorld:
    98        type: object
    99        properties:
   100          type:
   101            type: string
   102          id:
   103            type: string
   104            format: uuid
   105          attributes:
   106            type: object
   107            properties:
   108              message:
   109                type: string
   110              requestSubject:
   111                type: object
   112                properties:
   113                  publicId:
   114                    type: string
   115                    format: uuid
   116                  type:
   117                    type: string
   118                  clientId:
   119                    type: string
   120                    format: uuid
   121                required: ['publicId', 'type' ]
   122                additionalProperties: false
   123            required: ['message', 'requestSubject']
   124            additionalProperties: false
   125        required: ['type', 'id', 'attributes']
   126        additionalProperties: false