This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.go
150 lines (129 loc) · 3.24 KB
/
openapi.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package operation
import (
"encoding/json"
"github.com/trustbloc/ace/pkg/restapi/model"
"github.com/trustbloc/ace/pkg/restapi/vault"
)
// genericError model
//
// swagger:response genericError
type genericError struct { // nolint: unused,deadcode
// in: body
Body model.ErrorResponse
}
// createVaultReq model
//
// swagger:parameters createVaultReq
type createVaultReq struct{} // nolint: unused,deadcode
// createVaultResp model
//
// swagger:response createVaultResp
type createVaultResp struct {
// in: body
Body *vault.CreatedVault
}
// saveDocReq model
//
// swagger:parameters saveDocReq
type saveDocReq struct {
// in: path
VaultID string `json:"vaultID"`
// in: body
// required: true
Request SaveDocRequestBody
}
// SaveDocRequestBody describes body for the SaveDoc request.
type SaveDocRequestBody struct {
ID string `json:"id"`
Content json.RawMessage `json:"content"`
Tags []string `json:"tags"`
}
// saveDocResp model
//
// swagger:response saveDocResp
type saveDocResp struct {
// in: body
Body *vault.DocumentMetadata
}
// getDocMetadataReq model
//
// swagger:parameters getDocMetadataReq
type getDocMetadataReq struct { // nolint: unused,deadcode
// in: path
VaultID string `json:"vaultID"`
// in: path
DocID string `json:"docID"`
}
// getDocMetadataResp model
//
// swagger:response getDocMetadataResp
type getDocMetadataResp struct {
// in: body
Body *vault.DocumentMetadata
}
// createAuthorizationsReq model
//
// swagger:parameters createAuthorizationsReq
type createAuthorizationsReq struct {
// in: path
VaultID string `json:"vaultID"`
// in: body
// required: true
Request CreateAuthorizationsBody
}
// CreateAuthorizationsBody describes body for the createAuthorizations request.
type CreateAuthorizationsBody struct {
Scope vault.AuthorizationsScope `json:"scope"`
RequestingParty string `json:"requestingParty"`
}
// createAuthorizationResp model
//
// swagger:response createAuthorizationResp
type createAuthorizationResp struct {
// in: body
Body *vault.CreatedAuthorization
}
// getAuthorizationReq model
//
// swagger:parameters getAuthorizationReq
type getAuthorizationReq struct { // nolint: unused,deadcode
// in: path
VaultID string `json:"vaultID"`
// in: path
AuthorizationID string `json:"authID"`
}
// getAuthorizationResp model
//
// swagger:response getAuthorizationResp
type getAuthorizationResp struct { // nolint: unused,deadcode
// in: body
Body *vault.CreatedAuthorization
}
// deleteAuthorizationReq model
//
// swagger:parameters deleteAuthorizationReq
type deleteAuthorizationReq struct { // nolint: unused,deadcode
// in: path
VaultID string `json:"vaultID"`
// in: path
AuthorizationID string `json:"authID"`
}
// deleteAuthorizationResp model
//
// swagger:response deleteAuthorizationResp
type deleteAuthorizationResp struct{} // nolint: unused,deadcode
// deleteVaultReq model
//
// swagger:parameters deleteVaultReq
type deleteVaultReq struct { // nolint: unused,deadcode
// in: path
VaultID string `json:"vaultID"`
}
// deleteVaultResp model
//
// swagger:response deleteVaultResp
type deleteVaultResp struct{} // nolint: unused,deadcode