Marwes / schemafy

Crate for generating rust types from a json schema
MIT License
242 stars 51 forks source link

mixed enums #67

Open lizelive opened 1 year ago

lizelive commented 1 year ago
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"

lizelive commented 1 year ago

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