Skip to content

Commit f1fec00

Browse files
authored
feat: add /v3/accounts (#866)
1 parent 8315d58 commit f1fec00

16 files changed

+2348
-48
lines changed

api/docs.go

Lines changed: 512 additions & 1 deletion
Large diffs are not rendered by default.

api/swagger.json

Lines changed: 512 additions & 1 deletion
Large diffs are not rendered by default.

api/swagger.yaml

Lines changed: 361 additions & 1 deletion
Large diffs are not rendered by default.

pkg/controllers/account_v1.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func (co Controller) RegisterAccountRoutes(r *gin.RouterGroup) {
125125
// @Tags Accounts
126126
// @Success 204
127127
// @Router /v1/accounts [options]
128+
// @Deprecated true
128129
func (co Controller) OptionsAccountList(c *gin.Context) {
129130
httputil.OptionsGetPost(c)
130131
}
@@ -140,6 +141,7 @@ func (co Controller) OptionsAccountList(c *gin.Context) {
140141
// @Failure 500 {object} httperrors.HTTPError
141142
// @Param id path string true "ID formatted as string"
142143
// @Router /v1/accounts/{id} [options]
144+
// @Deprecated true
143145
func (co Controller) OptionsAccountDetail(c *gin.Context) {
144146
id, err := uuid.Parse(c.Param("id"))
145147
if err != nil {
@@ -166,6 +168,7 @@ func (co Controller) OptionsAccountDetail(c *gin.Context) {
166168
// @Failure 500 {object} httperrors.HTTPError
167169
// @Param account body models.AccountCreate true "Account"
168170
// @Router /v1/accounts [post]
171+
// @Deprecated true
169172
func (co Controller) CreateAccount(c *gin.Context) {
170173
var accountCreate models.AccountCreate
171174

@@ -268,6 +271,7 @@ func (co Controller) GetAccounts(c *gin.Context) {
268271
// @Failure 500 {object} httperrors.HTTPError
269272
// @Param id path string true "ID formatted as string"
270273
// @Router /v1/accounts/{id} [get]
274+
// @Deprecated true
271275
func (co Controller) GetAccount(c *gin.Context) {
272276
id, err := uuid.Parse(c.Param("id"))
273277
if err != nil {
@@ -296,6 +300,7 @@ func (co Controller) GetAccount(c *gin.Context) {
296300
// @Param id path string true "ID formatted as string"
297301
// @Param account body models.AccountCreate true "Account"
298302
// @Router /v1/accounts/{id} [patch]
303+
// @Deprecated true
299304
func (co Controller) UpdateAccount(c *gin.Context) {
300305
id, err := uuid.Parse(c.Param("id"))
301306
if err != nil {
@@ -341,6 +346,7 @@ func (co Controller) UpdateAccount(c *gin.Context) {
341346
// @Failure 500 {object} httperrors.HTTPError
342347
// @Param id path string true "ID formatted as string"
343348
// @Router /v1/accounts/{id} [delete]
349+
// @Deprecated true
344350
func (co Controller) DeleteAccount(c *gin.Context) {
345351
id, err := uuid.Parse(c.Param("id"))
346352
if err != nil {

pkg/controllers/account_v2.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func (co Controller) RegisterAccountRoutesV2(r *gin.RouterGroup) {
9393
// @Tags Accounts
9494
// @Success 204
9595
// @Router /v2/accounts [options]
96+
// @Deprecated true
9697
func (co Controller) OptionsAccountListV2(c *gin.Context) {
9798
httputil.OptionsGet(c)
9899
}
@@ -114,6 +115,7 @@ func (co Controller) OptionsAccountListV2(c *gin.Context) {
114115
// @Param external query bool false "Is the account external?"
115116
// @Param hidden query bool false "Is the account hidden?"
116117
// @Param search query string false "Search for this text in name and note"
118+
// @Deprecated true
117119
func (co Controller) GetAccountsV2(c *gin.Context) {
118120
var filter AccountQueryFilter
119121
if err := c.Bind(&filter); err != nil {

0 commit comments

Comments
 (0)