129 lines
3.3 KiB
JSON
129 lines
3.3 KiB
JSON
{
|
|
"components": {
|
|
"schemas": {
|
|
"GetParams": {
|
|
"description": "The name of a secret to read.",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The unique name within this vault.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"PutParams": {
|
|
"description": "The name and value of a secret.",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The unique name within this vault.",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"description": "The text to store until process exit.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"value"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"info": {
|
|
"title": "secrets",
|
|
"version": "0.1.0"
|
|
},
|
|
"methods": [
|
|
{
|
|
"description": "Open the in-memory vault and publish its endpoint.",
|
|
"name": "serve",
|
|
"paramStructure": "by-name",
|
|
"params": [],
|
|
"result": {
|
|
"name": "result",
|
|
"schema": {
|
|
"type": "null"
|
|
}
|
|
},
|
|
"summary": "Open the in-memory vault and publish its endpoint."
|
|
}
|
|
],
|
|
"openrpc": "1.2.6",
|
|
"x-sausage-endpoints": {
|
|
"vault": {
|
|
"methods": [
|
|
{
|
|
"description": "Store a secret and report its name to the caller.",
|
|
"name": "put",
|
|
"paramStructure": "by-name",
|
|
"params": [
|
|
{
|
|
"description": "The unique name within this vault.",
|
|
"name": "name",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "The unique name within this vault.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"description": "The text to store until process exit.",
|
|
"name": "value",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "The text to store until process exit.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "result",
|
|
"schema": {
|
|
"type": "null"
|
|
}
|
|
},
|
|
"summary": "Store a secret and report its name to the caller.",
|
|
"x-sausage-params": {
|
|
"$ref": "#/components/schemas/PutParams"
|
|
}
|
|
},
|
|
{
|
|
"description": "Read a secret, or return null when its name is absent.",
|
|
"name": "get",
|
|
"paramStructure": "by-name",
|
|
"params": [
|
|
{
|
|
"description": "The unique name within this vault.",
|
|
"name": "name",
|
|
"required": true,
|
|
"schema": {
|
|
"description": "The unique name within this vault.",
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"result": {
|
|
"name": "result",
|
|
"schema": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"summary": "Read a secret, or return null when its name is absent.",
|
|
"x-sausage-params": {
|
|
"$ref": "#/components/schemas/GetParams"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"x-sausage-imports": {}
|
|
}
|