ogen
ogen copied to clipboard
Generating code: cannot unmarshal !!int `0` into bool
What version of ogen are you using?
github.com/ogen-go/ogen v1.8.1
Can this issue be reproduced with the latest version?
Yes (used the latest version from go get).
What did you do?
Ran go generate on the Mistral AI OpenAPI spec.
What did you expect to see?
Generated files based on the spec.
What did you see instead?
A few errors of the same type:
- mistral.yaml:1383:29 -> cannot unmarshal !!int `0` into bool
1380 | title: Ref
1381 | weight:
1382 | default: 1
→ 1383 | exclusiveMinimum: 0
1384 | title: Weight
1385 | type: number
1386 | commit_id:
1387 | maxLength: 40
- mistral.yaml:1629:33 -> cannot unmarshal !!int `0` into bool
1626 | title: Warmup Fraction
1627 | epochs:
1628 | anyOf:
→ 1629 | - exclusiveMinimum: 0
1630 | type: number
1631 | - type: 'null'
1632 | title: Epochs
1633 | fim_ratio:
- mistral.yaml:1796:29 -> cannot unmarshal !!int `0` into bool
1793 | title: Ref
1794 | weight:
1795 | default: 1
→ 1796 | exclusiveMinimum: 0
1797 | title: Weight
1798 | type: number
1799 | token:
1800 | title: Token
- mistral.yaml:1886:29 -> cannot unmarshal !!int `0` into bool
1883 | type: string
1884 | weight:
1885 | default: 1
→ 1886 | exclusiveMinimum: 0
1887 | title: Weight
1888 | type: number
1889 | required:
1890 | - file_id
- mistral.yaml:1946:33 -> cannot unmarshal !!int `0` into bool
1943 | [mistral-finetune](https://github.com/mistralai/mistral-finetune)
1944 | epochs:
1945 | anyOf:
→ 1946 | - exclusiveMinimum: 0
1947 | type: number
1948 | - type: 'null'
1949 | title: Epochs
1950 | fim_ratio:
Not sure why it tries to convert the values into bool if the type is specified as number.