feat: implement optionsEndpoint for dynamic field options#10
Closed
stmh wants to merge 1 commit intoflowdrop-io:1.xfrom
Closed
feat: implement optionsEndpoint for dynamic field options#10stmh wants to merge 1 commit intoflowdrop-io:1.xfrom
stmh wants to merge 1 commit intoflowdrop-io:1.xfrom
Conversation
2d52158 to
5a5efe1
Compare
…drop-io#5) Adds the ability for select fields in config forms to fetch their options from a REST API at runtime, without requiring full dynamic schema replacement. Changes: - Add OptionsEndpoint interface for configuring runtime option fetching - Create optionsService.ts with fetch, cache, and normalization logic - Extract templateResolver.ts as shared utility from dynamicSchemaService - Integrate options loading into ConfigForm.svelte with $effect and enrichedSchema - Update OpenAPI spec with OptionsEndpoint schema - Add unit tests (27) and integration tests (7) - Add mise.toml for Node 20 version pinning Closes flowdrop-io#5
5a5efe1 to
e9a9182
Compare
Collaborator
Author
|
hi @d34dman here's a vibecoded submission for having dynamic options for select fields. So we do not need to use dynamicOptions just for a dynamic select. Will try to test it tomorrow against a backend, but would be good to know if you are open for the contribution. Not sure, why the ci is failing... |
Collaborator
|
fixed in 0.0.44 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements GitHub issue #5: REST endpoint for dynamic enum options.
This feature allows select fields in config forms to fetch their options from a REST API at runtime, without requiring a full dynamic schema replacement.
Changes
OptionsEndpointinterface for configuring how to fetch options from REST endpointsoptionsService.tswith fetching, caching (TTL-based), and response normalizationtemplateResolver.ts- extracted shared URL template resolution from dynamicSchemaService$effectand merges intoenrichedSchemaOptionsEndpointschemaExample Usage
Verification
npm run check)npm test)Closes #5