redhat-developer / redhat-developer/vscode-yaml
Better error message when a `$ref` attribute fails validation
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Is your enhancement related to a problem? Please describe.
For the gitlab-ci-schema plus
,
"variables": {
"markdownDescription": "Additional environment variables that are passed exclusively to the service. The syntax is the same as [Job Variables](https://docs.gitlab.com/ee/ci/variables/index.html).",
"$ref": "#/definitions/jobVariables"
}
in services:, input:
test_docker_image_with_service:
services:
- name: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
alias: service-under-test
variables:
- PORT: ${PORT}
gives:

which a very weird way of saying "please remove that - from inside variables:".
Describe the solution you would like
- Error message should be more clear.
- Also, maybe, "not provide schema-internal information" on the forefront (acceptable on
--verbose)
Describe alternatives you have considered
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the validation failure for the GitLab CI schema's services.variables $ref using the YAML example in the issue, then trace where that validation error is formatted. Done means the message explains that the list item is invalid and should be removed, while schema-internal details are reserved for verbose output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100