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

how to enable allowUnionTypes? #387

Open
Sam-Lin-MillersLab opened this issue Dec 1, 2023 · 3 comments
Open

how to enable allowUnionTypes? #387

Sam-Lin-MillersLab opened this issue Dec 1, 2023 · 3 comments

Comments

@Sam-Lin-MillersLab
Copy link

I got error like

  strict mode: use allowUnionTypes to allow union type keyword at "https://json.schemastore.org/appsettings.json#" (strictTypes)

thanks!

@chris48s
Copy link
Owner

chris48s commented Dec 4, 2023

allowUnionTypes is an ajv option. At the moment, v8r doesn't allow any way to pass options through to ajv, so there isn't a way to enable it.

Ajv has quite a lot of options: https://ajv.js.org/options.html

I'm a bit on the fence about how (or whether) to handle allowing the user to pass through configuration options to ajv 🤔 Feels like quite a big topic to rush into, but I'll have a think.

@Sam-Lin-MillersLab
Copy link
Author

I think it will be awesome to have a way to pass thru options. Thanks!

@chris48s
Copy link
Owner

I know it has been quite a long time since this issue was posted, but I have been thinking about it again today.
Are you able to provide an example of a schema that outputs this?

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

No branches or pull requests

2 participants