v8r icon indicating copy to clipboard operation
v8r copied to clipboard

how to enable allowUnionTypes?

Open Sam-Lin-MillersLab opened this issue 1 year ago • 3 comments

I got error like

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

thanks!

Sam-Lin-MillersLab avatar Dec 01 '23 22:12 Sam-Lin-MillersLab

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 :thinking: Feels like quite a big topic to rush into, but I'll have a think.

chris48s avatar Dec 04 '23 12:12 chris48s

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

Sam-Lin-MillersLab avatar Dec 04 '23 22:12 Sam-Lin-MillersLab

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?

chris48s avatar Jan 29 '24 16:01 chris48s