Skip to content
Open
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
7 changes: 7 additions & 0 deletions internal/apiserver/route_get_identity_by_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ import (
"github.com/hyperledger/firefly/pkg/core"
)

// @Summary Get identity by ID
// @ID getIdentityByID
// @Tags identities
// @Produce json
// @Param iid path string true "Identity ID"
// @Success 200 {object} core.Identity
// @Router /identities/{iid} [get]
var getIdentityByID = &ffapi.Route{
Name: "getIdentityByID",
Path: "identities/{iid}",
Expand Down
9 changes: 9 additions & 0 deletions internal/apiserver/route_patch_update_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ import (
"github.com/hyperledger/firefly/pkg/core"
)

// @Summary Update an identity
// @ID patchUpdateIdentity
// @Tags identities
// @Accept json
// @Produce json
// @Param iid path string true "Identity ID" <-- THE CRITICAL FIX
// @Param body body core.IdentityUpdateDTO true "Identity update details"
// @Success 202 {object} core.Identity
// @Router /identities/{iid} [patch]
var patchUpdateIdentity = &ffapi.Route{
Name: "patchUpdateIdentity",
Path: "identities/{iid}",
Expand Down
36 changes: 36 additions & 0 deletions internal/swagger/docs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Package swagger Code generated by swaggo/swag at 2025-10-10 07:17:54.1777731 +0530 IST m=+84.795132601. DO NOT EDIT
package swagger

import "github.com/swaggo/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {}
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
7 changes: 7 additions & 0 deletions internal/swagger/swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"swagger": "2.0",
"info": {
"contact": {}
},
"paths": {}
}
4 changes: 4 additions & 0 deletions internal/swagger/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
info:
contact: {}
paths: {}
swagger: "2.0"