Skip to content

Refactor fdpApi and add fetchUtils - #75

Merged
mihailefter merged 7 commits into
feature/34-api-docs-discoveryfrom
suggestion/34-api-docs-discovery
Sep 3, 2026
Merged

Refactor fdpApi and add fetchUtils#75
mihailefter merged 7 commits into
feature/34-api-docs-discoveryfrom
suggestion/34-api-docs-discovery

Conversation

@dennisvang

@dennisvang dennisvang commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

This moves the bindOperation calls to fdpApi.ts to improve cohesion.

Also moved the generic request and fetch* functions from fdpApi into a separate fetchUtils module to prevent circular imports between apiDocs and fdpApi, and renamed fetchApiDocs to fetchJSON.

@mihailefter these are just some quick-and-dirty changes to illustrate what I had in mind in my review of #64

Feel free to ignore, or modify to your liking. 🙂

todo:

  • fix circular imports (fdpApi now imports from apiDocs, which imports from fdpApi, ...) -> perhaps move the fetchRdfTurtle, fetchApiDocs and related functions into a separate module?

and rename fetchApiDocs to fetchJSON.

This allows us to remove the cyclic imports between fdpApi and apiDocs.
@dennisvang
dennisvang marked this pull request as ready for review September 3, 2026 07:54
@mihailefter

mihailefter commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Hi @dennisvang! This is a real improvement, thanks. I pushed a few small changes on top: converted searchResources too, since it was the last function still taking url and method, added some tests, and updated some stale comments in the tests.

I’ll squash and merge this entire stack now to complete this and close the corresponding issue, if you agree.

@dennisvang

Copy link
Copy Markdown
Collaborator Author

Hi @mihailefter well spotted, somehow I missed that searchResources. 😅

Yes, please, go ahead with the merge (this will close #34 automatically).

@mihailefter
mihailefter merged commit 724b806 into master Sep 3, 2026
3 checks passed
@dennisvang
dennisvang deleted the suggestion/34-api-docs-discovery branch September 3, 2026 13:27
@dennisvang dennisvang changed the title Suggested changes to PR 64 Refactor fdpApi and add fetchUtils Sep 8, 2026
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