github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/bugs/2919/edge-api/management/terminators.yml (about)

     1  ---
     2  paths:
     3    terminators:
     4      get:
     5        summary: List terminators
     6        description: |
     7          Retrieves a list of terminator resources; supports filtering, sorting, and pagination. Requires admin access.
     8        security:
     9          - ztSession: [ ]
    10        tags:
    11          - Terminator
    12        operationId: listTerminators
    13        parameters:
    14          - $ref: '../shared/parameters.yml#/limit'
    15          - $ref: '../shared/parameters.yml#/offset'
    16          - $ref: '../shared/parameters.yml#/filter'
    17        responses:
    18          '200':
    19            $ref: '#/responses/listTerminators'
    20          '401':
    21            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    22          '400':
    23            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
    24      post:
    25        summary: Create a terminator resource
    26        description: Create a terminator resource. Requires admin access.
    27        security:
    28          - ztSession: [ ]
    29        tags:
    30          - Terminator
    31        operationId: createTerminator
    32        parameters:
    33          - name: terminator
    34            in: body
    35            required: true
    36            description: A terminator to create
    37            schema:
    38              $ref: '#/definitions/terminatorCreate'
    39        responses:
    40          '201':
    41            $ref: '../shared/standard-responses.yml#/responses/createResponse'
    42          '400':
    43            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
    44          '401':
    45            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    46    terminators-id:
    47      parameters:
    48        - $ref: '../shared/parameters.yml#/id'
    49      get:
    50        summary: Retrieves a single terminator
    51        description: Retrieves a single terminator by id. Requires admin access.
    52        security:
    53          - ztSession: [ ]
    54        tags:
    55          - Terminator
    56        operationId: detailTerminator
    57        responses:
    58          '200':
    59            $ref: '#/responses/detailTerminator'
    60          '404':
    61            $ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
    62          '401':
    63            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    64      put:
    65        summary: Update all fields on a terminator
    66        description: Update all fields on a terminator by id. Requires admin access.
    67        security:
    68          - ztSession: [ ]
    69        tags:
    70          - Terminator
    71        operationId: updateTerminator
    72        parameters:
    73          - name: terminator
    74            in: body
    75            required: true
    76            description: A terminator update object
    77            schema:
    78              $ref: '#/definitions/terminatorUpdate'
    79        responses:
    80          '200':
    81            $ref: '../shared/standard-responses.yml#/responses/updateResponse'
    82          '400':
    83            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
    84          '404':
    85            $ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
    86          '401':
    87            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    88      patch:
    89        summary: Update the supplied fields on a terminator
    90        description: Update the supplied fields on a terminator. Requires admin access.
    91        security:
    92          - ztSession: [ ]
    93        tags:
    94          - Terminator
    95        operationId: patchTerminator
    96        parameters:
    97          - name: terminator
    98            in: body
    99            required: true
   100            description: A terminator patch object
   101            schema:
   102              $ref: '#/definitions/terminatorPatch'
   103        responses:
   104          '200':
   105            $ref: '../shared/standard-responses.yml#/responses/patchResponse'
   106          '400':
   107            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
   108          '404':
   109            $ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
   110          '401':
   111            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
   112      delete:
   113        summary: Delete a terminator
   114        description: Delete a terminator by id. Requires admin access.
   115        security:
   116          - ztSession: [ ]
   117        tags:
   118          - Terminator
   119        operationId: deleteTerminator
   120        responses:
   121          '200':
   122            $ref: '../shared/standard-responses.yml#/responses/deleteResponse'
   123          '400':
   124            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
   125          '401':
   126            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
   127          '409':
   128            $ref: '../shared/standard-responses.yml#/responses/cannotDeleteReferencedResourceResponse'
   129  
   130  responses:
   131    listTerminators:
   132      description: A list of terminators
   133      schema:
   134        $ref: '#/definitions/listTerminatorsEnvelope'
   135    detailTerminator:
   136      description: A single terminator
   137      schema:
   138        $ref: '#/definitions/detailTerminatorEnvelope'
   139  
   140  definitions:
   141    listTerminatorsEnvelope:
   142      type: object
   143      required:
   144        - meta
   145        - data
   146      properties:
   147        meta:
   148          $ref: '../shared/standard-responses.yml#/definitions/meta'
   149        data:
   150          $ref: '#/definitions/terminatorList'
   151    detailTerminatorEnvelope:
   152      type: object
   153      required:
   154        - meta
   155        - data
   156      properties:
   157        meta:
   158          $ref: '../shared/standard-responses.yml#/definitions/meta'
   159        data:
   160          $ref: '#/definitions/terminatorDetail'
   161    terminatorList:
   162      type: array
   163      items:
   164        $ref: '#/definitions/terminatorDetail'
   165    terminatorDetail:
   166      type: object
   167      allOf:
   168        - $ref: '../shared/base-entity.yml#/definitions/baseEntity'
   169        - type: object
   170          required:
   171            - serviceId
   172            - service
   173            - routerId
   174            - router
   175            - binding
   176            - address
   177            - identity
   178            - cost
   179            - precedence
   180            - dynamicCost
   181          properties:
   182            serviceId:
   183              type: string
   184            service:
   185              $ref: '../shared/base-entity.yml#/definitions/entityRef'
   186            routerId:
   187              type: string
   188            router:
   189              $ref: '../shared/base-entity.yml#/definitions/entityRef'
   190            binding:
   191              type: string
   192            address:
   193              type: string
   194            identity:
   195              type: string
   196            cost:
   197              $ref: '../shared/terminators.yml#/definitions/terminatorCost'
   198            precedence:
   199              $ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
   200            dynamicCost:
   201              $ref: '../shared/terminators.yml#/definitions/terminatorCost'
   202    terminatorCreate:
   203      type: object
   204      required:
   205        - service
   206        - router
   207        - address
   208        - binding
   209      properties:
   210        service:
   211          type: string
   212        router:
   213          type: string
   214        binding:
   215          type: string
   216        address:
   217          type: string
   218        identity:
   219          type: string
   220        identitySecret:
   221          type: string
   222          format: byte
   223        cost:
   224          $ref: '../shared/terminators.yml#/definitions/terminatorCost'
   225        precedence:
   226          $ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
   227        tags:
   228          $ref: '../shared/base-entity.yml#/definitions/tags'
   229    terminatorUpdate:
   230      type: object
   231      required:
   232        - service
   233        - router
   234        - address
   235        - binding
   236      properties:
   237        service:
   238          type: string
   239        router:
   240          type: string
   241        binding:
   242          type: string
   243        address:
   244          type: string
   245        cost:
   246          $ref: '../shared/terminators.yml#/definitions/terminatorCost'
   247        precedence:
   248          $ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
   249        tags:
   250          $ref: '../shared/base-entity.yml#/definitions/tags'
   251    terminatorPatch:
   252      type: object
   253      properties:
   254        service:
   255          type: string
   256        router:
   257          type: string
   258        binding:
   259          type: string
   260        address:
   261          type: string
   262        cost:
   263          $ref: '../shared/terminators.yml#/definitions/terminatorCost'
   264        precedence:
   265          $ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
   266        tags:
   267          $ref: '../shared/base-entity.yml#/definitions/tags'