equinor / equinor/fusion-framework

services module: move OData filter-schema transformer to a shared utility module

Open
#5,162 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10
Forks
10
Avg merge
19h 40m
Merged PRs (30d)
150

Description

## Context

In `packages/modules/services/src/bookmarks/endpoints/user-bookmarks.get.ts`, the OData filter-schema transformer carries a note that it belongs in a shared location:

```ts
/**
* Schema transformer of the filter object to an OData filter string.
*
* @todo This function should be moved to a shared utility module.
*/
```

## Task

- Identify (or create) an appropriate shared utility module for OData filter-schema transformers within `@equinor/fusion-framework-module-services` (or a more general utils package if it's reusable beyond bookmarks).
- Move the transformer there and update the import in `user-bookmarks.get.ts`.
- Check for other endpoints with similar inline transformers that could reuse the shared utility.

## File

`packages/modules/services/src/bookmarks/endpoints/user-bookmarks.get.ts` (line ~22)

Contributor guide

Open the contributing guide

Research direction

Start with packages/modules/services/src/bookmarks/endpoints/user-bookmarks.get.ts and locate the inline OData filter-schema transformer and its current import context. Inspect the services module or a more general utils package for an appropriate shared location, then check other endpoints for similar transformers. Done means the transformer is shared, user-bookmarks.get.ts uses it, and any suitable duplicate endpoint logic reuses it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.