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

Clean up API spec for token approvals #775

Merged
merged 1 commit into from
Apr 29, 2022
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
31 changes: 0 additions & 31 deletions docs/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10367,10 +10367,6 @@ paths:
description: A string identifying the parties and entities in
the scope of this approval, as provided by the token connector
type: string
tokenIndex:
description: The index of the token within the pool that this
approval applies to
type: string
tx:
description: If submitted via FireFly, this will reference the
UUID of the FireFly transaction (if the token connector in
Expand Down Expand Up @@ -10431,37 +10427,18 @@ paths:
of the approval. See your chosen token connector documentation
for details
type: object
info:
additionalProperties:
description: Token connector specific information about the approval
operation, such as whether it applied to a limited balance of
a fungible token. See your chosen token connector documentation
for details
description: Token connector specific information about the approval
operation, such as whether it applied to a limited balance of
a fungible token. See your chosen token connector documentation
for details
type: object
key:
description: The blockchain signing key for the approval request.
On input defaults to the first signing key of the organization
that operates the node
type: string
namespace:
description: The namespace for the approval, which must match the
namespace of the token pool
type: string
operator:
description: The blockchain identity that is granted the approval
type: string
pool:
description: The UUID the token pool this approval applies to
format: uuid
type: string
tokenIndex:
description: The index of the token within the pool that this approval
applies to
type: string
type: object
responses:
"200":
Expand Down Expand Up @@ -10531,10 +10508,6 @@ paths:
description: A string identifying the parties and entities in
the scope of this approval, as provided by the token connector
type: string
tokenIndex:
description: The index of the token within the pool that this
approval applies to
type: string
tx:
description: If submitted via FireFly, this will reference the
UUID of the FireFly transaction (if the token connector in use
Expand Down Expand Up @@ -10617,10 +10590,6 @@ paths:
description: A string identifying the parties and entities in
the scope of this approval, as provided by the token connector
type: string
tokenIndex:
description: The index of the token within the pool that this
approval applies to
type: string
tx:
description: If submitted via FireFly, this will reference the
UUID of the FireFly transaction (if the token connector in use
Expand Down
1 change: 0 additions & 1 deletion internal/coremsgs/en_struct_descriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ var (
// TokenApproval field descriptions
TokenApprovalLocalID = ffm("TokenApproval.localId", "The UUID of this token approval, in the local FireFly node")
TokenApprovalPool = ffm("TokenApproval.pool", "The UUID the token pool this approval applies to")
TokenApprovalTokenIndex = ffm("TokenApproval.tokenIndex", "The index of the token within the pool that this approval applies to")
TokenApprovalConnector = ffm("TokenApproval.connector", "The name of the token connector, as specified in the FireFly core configuration file. Required on input when there are more than one token connectors configured")
TokenApprovalKey = ffm("TokenApproval.key", "The blockchain signing key for the approval request. On input defaults to the first signing key of the organization that operates the node")
TokenApprovalOperator = ffm("TokenApproval.operator", "The blockchain identity that is granted the approval")
Expand Down
5 changes: 2 additions & 3 deletions pkg/fftypes/tokenapproval.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ type TokenApprovalInput struct {
type TokenApproval struct {
LocalID *UUID `ffstruct:"TokenApproval" json:"localId,omitempty" ffexcludeinput:"true"`
Pool *UUID `ffstruct:"TokenApproval" json:"pool,omitempty"`
TokenIndex string `ffstruct:"TokenApproval" json:"tokenIndex,omitempty"`
Connector string `ffstruct:"TokenApproval" json:"connector,omitempty" ffexcludeinput:"true"`
Key string `ffstruct:"TokenApproval" json:"key,omitempty"`
Operator string `ffstruct:"TokenApproval" json:"operator,omitempty"`
Approved bool `ffstruct:"TokenApproval" json:"approved"`
Info JSONObject `ffstruct:"TokenApproval" json:"info,omitempty"`
Namespace string `ffstruct:"TokenApproval" json:"namespace,omitempty"`
Info JSONObject `ffstruct:"TokenApproval" json:"info,omitempty" ffexcludeinput:"true"`
Namespace string `ffstruct:"TokenApproval" json:"namespace,omitempty" ffexcludeinput:"true"`
ProtocolID string `ffstruct:"TokenApproval" json:"protocolId,omitempty" ffexcludeinput:"true"`
Subject string `ffstruct:"TokenApproval" json:"subject,omitempty" ffexcludeinput:"true"`
Active bool `ffstruct:"TokenApproval" json:"active,omitempty" ffexcludeinput:"true"`
Expand Down