Update swagger for missing secret definitions

- added secret definition and removed types used previously

Remove structs for secrets

- after discussion on PR the core contributors decided we just
want simple CRUD with the Secret type.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (VMware)
2019-01-04 16:46:03 +00:00
committed by Alex Ellis
parent b206cb829a
commit a65df4795b
2 changed files with 19 additions and 22 deletions

View File

@ -91,24 +91,8 @@ type DeleteFunctionRequest struct {
FunctionName string `json:"functionName"`
}
// SecretInfo payload for PUT,POST secret w/ annotations
type SecretInfo struct {
Secret Secret `json:"secret"`
Annotations map[string]string `json:"annotations,omitempty"`
}
// ListSecretsResponse GET response for secrets (value omitted)
type ListSecretsResponse struct {
Secrets []SecretInfo `json:"secrets"`
}
// DeleteSecretRequest remote a secret by name
type DeleteSecretRequest struct {
SecretName string `json:"secretName"`
}
// Secret schema use Value only in PUT,POST http verbs
// Secret for underlying orchestrator
type Secret struct {
Name string `json:"name"`
Value string `json:"value,omitempty"` // write-only, base64
Value string `json:"value,omitempty"`
}