Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve form to allow any type used in JSON Schema #38

Open
github-actions bot opened this issue Aug 15, 2023 · 1 comment
Open

Improve form to allow any type used in JSON Schema #38

github-actions bot opened this issue Aug 15, 2023 · 1 comment
Labels
enhancement New feature or request plugin Issue relating the Plugin Page settings Issue relating the Settings Page todo Created by the to-do action

Comments

@github-actions
Copy link
Contributor

github-actions bot commented Aug 15, 2023

Describe the reason of this issue
Can also totally replace the current library used for dynamic form

The issue is present here:

import { merge } from "lodash"
import { Form, Field } from "vee-validate"

// FEATURE: Improve form to allow any type of input based on json schema
// Can also totally replace the current library used for dynamic form

const props = withDefaults(
	defineProps<{
		fields: SchemaField[]
@github-actions github-actions bot added enhancement New feature or request todo Created by the to-do action labels Aug 15, 2023
@zAlweNy26 zAlweNy26 changed the title Improve form to allow any type of input based on json schema Improve form to allow any type used in JSON Schema Aug 15, 2023
@zAlweNy26 zAlweNy26 added plugin Issue relating the Plugin Page settings Issue relating the Settings Page labels Aug 15, 2023
@zAlweNy26
Copy link
Member

zAlweNy26 commented Dec 17, 2023

A possible (but really bad) solution, can be this one:
https://github.com/StefanTerdell/json-schema-to-zod?tab=readme-ov-file#use-at-runtime

Otherwise, we can manually create Zod Objects for each provider/embedder settings, but in this case, the plugin settings would remain as it is now, without validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin Issue relating the Plugin Page settings Issue relating the Settings Page todo Created by the to-do action
Projects
None yet
Development

No branches or pull requests

1 participant