blockcore-indexer
blockcore-indexer copied to clipboard
Generate operationId from controller method name
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](https://user-images.githubusercontent.com/39023939/207867115-c1636b9d-fe24-4af2-9aa7-52c6b27c61b9.png)