Marwes / schemafy

Crate for generating rust types from a json schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mixed enums

lizelive opened this issue · comments

error: proc macro panicked
  --> src/main.rs:11:1
   |
11 | / schemafy::schemafy!(
12 | |     root: DevContainerBase // Optional name for the root type (if one exists)
13 | |     "schema/devContainer.base.schema.json"
14 | | );
   | |_^
   |
   = help: message: Expected string for enum got `true`

https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json

seems to be caused by
#28

"gpu" is enum with true, false, or "optional"

i can patch the file to workaround but was wondering if there was better way?