hedera-mirror-node
hedera-mirror-node copied to clipboard
NFT allowance rest API enhancement and validations
Problem
- Currently the NFT allowance API returns approve_for_all=true and false values.
- Need to add Query Parameter validation as per openapi spec.
Solution
- Modify the NFT allowance API to return values only for
approve_for_all=trueExample : GET/api/v1/accounts/0.0.8488/allowances/nfts?limit=3&owner=false
{
"allowances": [
{
"owner": "0.0.1000",
"spender": "0.0.8488",
"token_id": "0.0.1033",
"timestamp": {
"from": "1633466229.96874612",
"to": null
}
},
{
"owner": "0.0.1000",
"spender": "0.0.8488",
"token_id": "0.0.1034",
"timestamp": {
"from": "1633466229.96874618",
"to": null
}
}
],
"links": {
"next": "/api/v1/accounts/0.0.8488/allowances/nfts?limit=3&order=asc&account.id=gte:1000&token.id=gt:0.0.1034"
}
}
- Add validation for checking multiple existence of query params
not supported.
Alternatives
No response
Creating a separate ticket for - Next link generation correction.