Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add swagger specification for a new path called /randomnumbers #13680

Merged
merged 3 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,7 @@ racyscore
RAGRS
RAGZRS
randint
randomnumbers
Rankable
ratelimit
ravbhatnagar
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"vaultBaseUrl": "https://myhsm.managedhsm.azure.net/",
"api-version": "7.3-preview",
"parameters": {
"bytesLength": 4
}
},
"responses": {
"200": {
"body": {
"value": "MTIzNA"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1088,9 +1088,78 @@
}
}
}
},
"/randomnumbers": {
"post": {
"tags": [
"RandomNumbers"
],
"operationId": "getRandomNumbers",
"summary": "Get the requested number of bytes containing random values.",
"description": "Get the requested number of bytes containing random values from a managed HSM.",
"parameters": [
{
"name": "parameters",
"in": "body",
"required": true,
"x-ms-client-flatten": true,
"schema": {
"$ref": "#/definitions/GetRandomNumbersRequest"
},
"description": "The request object to get random numbers."
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "The bytes encoded as a base64url string.",
"schema": {
"$ref": "#/definitions/GetRandomNumbersResponse"
}
},
"default": {
"description": "Key Vault error response describing why the operation failed.",
"schema": {
"$ref": "common.json#/definitions/KeyVaultError"
}
}
},
"x-ms-examples": {
"GetRandomNumbers": {
"$ref": "./examples/RandomNumbers-example.json"
}
}
}
}
},
"definitions": {
"GetRandomNumbersRequest": {
"properties": {
"bytesLength": {
"type": "integer",
"format": "int32",
"minimum": 1,
"maximum": 128,
"description": "The requested number of random bytes."
}
},
"description": "The get random numbers request object.",
"required": [
"bytesLength"
]
},
"GetRandomNumbersResponse": {
"properties": {
"value": {
"type": "string",
"format": "base64url",
"description": "The bytes encoded as a base64url string."
}
},
"description": "The get random numbers response object containing the bytes."
},
"KeyReleasePolicy": {
"properties": {
"contentType": {
Expand Down