openapi: 3.0.0
info:
  title: Test Control API
  description: >-
    Nodeos Test Control API Specification. See developer documentation at
    https://docs.eosnetwork.com for information on enabling this plugin.
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    url: https://eosnetwork.com
tags:
  - name: eosio
servers:
  - url: '{protocol}://{host}:{port}/v1/'
    variables:
      protocol:
        enum:
          - http
          - https
        default: http
      host:
        default: localhost
      port:
        default: '8080'
components:
  schemas:
    NamePrivileged:
      type: string
      description: String representation of privileged EOSIO name type
      pattern: ^(eosio[\.][a-z1-5]{1,6})([a-j]{1})?$
      title: NamePrivileged
    NameBasic:
      type: string
      description: >-
        String representation of basic EOSIO name type, must be 12 characters
        and contain only a-z and 0-5
      pattern: ^([a-z]{1}[a-z1-5]{11})([a-j]{1})?$
      title: NameBasic
    NameBid:
      type: string
      description: >-
        String representation of EOSIO bid name type, 1-12 characters and only
        a-z and 0-5 are allowed
      pattern: ^([a-z1-5]{1,12})([a-j]{1})?$
      title: NameBid
    NameCatchAll:
      type: string
      description: String representation of EOSIO name type
      pattern: ^([a-z1-5]{1}[a-z1-5\.]{0,10}[a-z1-5]{1})([a-j]{1})?$
      title: NameCatchAll
    Name:
      anyOf:
        - $ref: '#/components/schemas/NamePrivileged'
        - $ref: '#/components/schemas/NameBasic'
        - $ref: '#/components/schemas/NameBid'
        - $ref: '#/components/schemas/NameCatchAll'
      title: Name
paths:
  /test_control/kill_node_or_producer:
    post:
      tags:
        - TestControl
      summary: kill_node_or_producer
      description: Kills node or producer
      operationId: kill_node_or_producer
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - params
              properties:
                params:
                  type: object
                  properties:
                    producer:
                      $ref: '#/components/schemas/Name'
                    where_in_sequence:
                      type: integer
                    based_on_lib:
                      type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Returns Nothing
