Skip to content

Certain API endpoints not visible in Commit API Explorer. #97

@JinanshShah1792002

Description

@JinanshShah1792002

I am using the Commit app integrated with ERPNext to view and test my custom APIs.

I noticed an issue where some API functions do not appear in the Commit API Explorer, even though:

  • They are defined correctly
  • They have @frappe.whitelist() (or similar) decorators
  • They load without errors in ERPNext
  • The module imports successfully in bench console
  • Bench restart does not fix the issue

Specific Scenario:

I created a custom API function named get_unified_data inside custome app nexspace.nexspace.frontend_api.api.
Initially, this function did not appear in the Commit API Explorer at all.
However, when I reordered the code and moved this function higher in the file (above certain APIs), the API immediately became visible.
There is no change in code, only the position of the function affects visibility.
This indicates a problem where Commit’s API discovery engine stops scanning the file after a certain function or pattern.

Troubleshooting that I Done:

  • Verified module import using bench console → imports successfully
  • Checked for syntax errors → none
  • Confirmed decorators (@frappe.whitelist, allow_guest=True)
  • Restarted bench multiple times
  • Hard-refresh browser & cleared cache
  • No errors in console or server logs
  • Only reordering functions affects visibility

Request:
Please investigate this order-dependent API detection bug, where Commit stops discovering API functions after encountering certain patterns in the file. Any guidance or fix would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions