-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
constant number is converted to a generic number
type
#1912
Comments
I just tried it with the latest version and get this yarn --silent run run --path 'test.ts' --type '*'
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Configuration": {
"additionalProperties": false,
"properties": {
"version": {
"type": "number"
}
},
"type": "object"
},
"ConfigurationV1": {
"additionalProperties": false,
"properties": {
"version": {
"const": 1,
"type": "number"
}
},
"required": [
"version"
],
"type": "object"
},
"ConfigurationV2": {
"additionalProperties": false,
"properties": {
"version": {
"const": 2,
"type": "number"
}
},
"required": [
"version"
],
"type": "object"
}
}
} I think this is fixed. |
by latest you mean |
just tried in |
Try the next branch and show me an example. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying to upgrade to the new
1.5.1
2.0.1
version.I have a type definition with a constant number:
the generated schemas in
1.5.0
USED TO include the hard-coded value for the specific versions, like so:but now it's generated without the
const
partim using
pnpm@7.33.4
node@20.12.1
The text was updated successfully, but these errors were encountered: