ebowman/api-first-hand

JSON schema enums produce code that does not compile.

alexec opened this issue · 5 comments

I'll update when I have stack trace.

Workaround:

Cannot use the enum keyword. Remove, replace with pattern.

Good:

"foobar": {
    "type": "string, 
    "pattern: "(cash|accruals)"
}

Bad:

"foobar": {
    "type": "string, 
    "enum": [
        "cash", 
        "accruals"
    ]
}

Hi @alexec, if you'd like to make a PR to address the bug that would be great.

Should be resolved with #73

s12v commented

@slavaschmidt, this seems to be fixed/merged/released?

@s12v, yeah, this should be fixed in 0.2.0, I had no time to manually verify that it works or add the example to the scripted test, therefore not closing the ticket yet.