redhat-developer / redhat-developer/vscode-yaml

`oneOf` and `properties` not working together

Open
#893 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Describe the bug

The following schema file is correct according to the meta-schema: https://bitbucket.org/atlassianlabs/intellij-bitbucket-references-plugin/raw/46016b9443f59e5b3d240e2544253a765a885e34/src/main/resources/schemas/bitbucket-pipelines.schema.json - in the definition of complex_image, oneOf and properties are allowed to be on the same level.

However, it seems that oneOf is used and properties is ignored.

Expected Behavior

The following example should be valid:

image:
  name: my-image
  username: $USER
  password: $PASS

Current Behavior

However, the name property is highlighted as not allowed.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the linked bitbucket-pipelines.schema.json, especially the complex_image definition, and reproduce the YAML example in a VS Code environment. Trace how the schema handles oneOf alongside properties; done means the name, username, and password properties are accepted without the name property being highlighted as invalid.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode, yaml
Domain
devtools, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.