Skip to content

Fix/change api calls for autocomplete#129

Merged
jeroenrinzema merged 3 commits intomainfrom
fix/change-api-calls-for-autocomplete
Feb 2, 2026
Merged

Fix/change api calls for autocomplete#129
jeroenrinzema merged 3 commits intomainfrom
fix/change-api-calls-for-autocomplete

Conversation

@IamKirbki
Copy link
Copy Markdown
Contributor

@IamKirbki IamKirbki commented Feb 2, 2026

This pull request updates how event schema paths are fetched and handled throughout the codebase, standardizing the API endpoint and improving the structure and usage of event schema suggestions in the frontend. The main changes include switching the event schema endpoint, updating the data types and structures used for event path suggestions, and refactoring related frontend components to accommodate these changes.

API endpoint and backend updates:

  • Changed the event schema endpoint from /events to /events/schema in all relevant backend code, including OpenAPI specs, generated code, and tests. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Type and structure improvements:

  • Updated the VariableSuggestions type: eventPaths is now an array of EventSchema objects (each with id, name, and schema), replacing the previous object mapping event names to arrays of RulePath. Added new types EventSchema and EventSchemaPath. [1] [2]
  • Refactored the frontend API call in api.ts to fetch and transform event schema data from the new endpoint, prefixing paths with .data for consistency.

Frontend component refactoring:

  • Made the Combobox component generic to support both RulePath and EventSchemaPath types, allowing flexible use for different path suggestions. [1] [2] [3]
  • Updated FilterRuleEdit to use the new event schema structure, including filtering and displaying schema paths and determining the correct data type for each path option. [1] [2] [3]
  • Modified RuleEventName to build event options from the new eventPaths array structure instead of an object map, and updated rendering logic for event names. [1] [2]

Minor cleanup:

  • Removed an unused import in router.tsx for clarity.

Closes, #111

@jeroenrinzema jeroenrinzema merged commit 3277280 into main Feb 2, 2026
4 checks passed
@jeroenrinzema jeroenrinzema deleted the fix/change-api-calls-for-autocomplete branch February 2, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants