blockcore-indexer icon indicating copy to clipboard operation
blockcore-indexer copied to clipboard

Generate operationId from controller method name

Open drmathias opened this issue 1 year ago • 1 comments

Generates and includes an operationId for each endpoint, based on the method name. The purpose of this is so that it is viable to code generate an API client, with unambiguous method names. Updated some of the controller method names to make it clearer what the endpoint does.

Example output:

"/api/command/send": {
  "post": {
    "tags": [
      "Command"
    ],
    "operationId": "sendTransaction",
    "requestBody": {
      "content": {
        "application/json-patch+json": {
          "schema": {
            "type": "string"
          }
        },
        "application/json": {
          "schema": {
            "type": "string"
          }
        },
        "text/json": {
          "schema": {
            "type": "string"
          }
        },
        "application/*+json": {
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "200": {
        "description": "Success"
      }
    }
  }
}
image

drmathias avatar Dec 15 '22 13:12 drmathias