Skip to content

[Bug] Incorrect Use of EntryFunctionId in View Function Example in OpenAPI Spec #17158

@WGB5445

Description

@WGB5445

🐛 Bug

The example body currently shown at https://fullnode.mainnet.aptoslabs.com/v1/spec#/operations/view is completely unusable.

The reason is:

The current body in the view section is:

{
  "function": "0x1::aptos_coin::transfer",
  "type_arguments": [
    "string"
  ],
  "arguments": [
    null
  ]
}
Image

The main issue is that it's using 0x1::aptos_coin::transfer as the view function ID, which is incorrect.
In addition, the arguments are invalid — the type argument should be 0x1::aptos_coin::AptosCoin or adjusted to query the balance of an FA instead.

Overall, this can easily cause confusion for developers.

Suggested Fix

In the spec file here, it's currently using EntryFunctionId, which is incorrect for a view.

It should instead define a new ViewFunctionId and update this section to use ViewFunctionId accordingly.

Expected Impact

As far as we can tell, this issue only affects the spec documentation and standard usage guides. There don't appear to be any other components that depend directly on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions