-
Notifications
You must be signed in to change notification settings - Fork 292
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
Error importing gitlab json schema #1939
Comments
@benmoss thanks for your patience here. Following these steps to commit 7cac80c74d52cce38faa8a0068305a370a417ebd you reference above, using cad3f23 (current tip):
I see:
Looking at the relevant bits from the schema: "rules": {
"type": "array",
"items": {
"anyOf": [
{"type": "object"},
{"type": "array", "minLength": 1, "items": { "type": "string" }}
],
"properties": {
"if": { "$ref": "#/definitions/if" },
"changes": { "$ref": "#/definitions/changes" },
"exists": { "$ref": "#/definitions/exists" },
"variables": { "$ref": "#/definitions/variables" },
"when": {
"type": "string",
"enum": ["always", "never"]
}
},
"additionalProperties": false
}
} The slightly cryptic error message refers to this line:
might have been what was intended. If we fix the schema in these two places to use So I believe this is a bug in the source JSONSchema. But please let me know if this analysis doesn't correspond with your understanding. |
For anyone following along here, I just raised https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148555 to fix the schema upstream. |
And delighted to say that https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148555 is now merged! |
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yep
What did you do?
Permalink to latest commit: https://gitlab.com/gitlab-org/gitlab/-/blob/7cac80c74d52cce38faa8a0068305a370a417ebd/app/assets/javascripts/editor/schema/ci.json
What did you expect to see?
The schema converted to CUE
What did you see instead?
Lines 116 and 703 for reference
The text was updated successfully, but these errors were encountered: