Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

mismatch between published JSON schema for bitbucket-pipelines.yml and bitbucket pipelines validator

Max DeCurtins
Contributor
May 15, 2025

This is driving me nuts. I'm using WebStorm as my IDE, and when editing my bitbucket-pipelines.yml file, it is giving me a schema validation error on the following block (generic example):

pipelines:
branches:
master:
- stage:
name: My Stage
steps:
- step:
name: My Step

It says that the property "stage" is not allowed. I have WebStorm pointing directly to https://api.bitbucket.org/schemas/pipelines-configuration for this file.

However, if I copy/paste the bitbucket-pipelines.yml file in its entirety to https://bitbucket.org/product/pipelines/validator , it says my configuration is valid.

What gives?? This is driving me crazy.

1 answer

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2025

Hey @Max DeCurtins,

Pipelines developer here :)

The online validator is unfortunately indeed quite limited. For example, it doesn't handle a file with anchors and aliases at all. We are aware of this, and we will eventually improve it. The online validator also doesn't use the JSON schema, which has been introduced relatively recently.

However, the block you mentioned is actually highlighted as invalid by validator, and it shows the reason: script is missing in the step.

image.png

Once I add a script with a command, it becomes a valid configuration:image.png

But this configuration looks valid in IntelliJ equipped with the JSON schema:

image.png

I assume you simplified the config to surface the issue. Can you post a sample which is closer to the original config in question, if not that config as is? Then I'll be able to tell what's wrong.

Cheers,
Daniil

Max DeCurtins
Contributor
May 20, 2025

Hi @Daniil Penkin 

Yeah I was just using a generic example in my post, I didn't flesh it out fully and that's why the snippet wasn't fully valid.

See a screenshot of the issue below. The "BB pipelines configuration" schema is me telling WebStorm to validate against the remote URL for the JSON schema just to be sure it's not using a bundled version or some other source.

bbp_stage.png

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 20, 2025

Hey @Max DeCurtins,

Thanks for the screenshot, now it's clear what is wrong.

The problem is with the indentation of one of the step properties: lines 39-45 should be indented further to appear under their parent step (check out lines 47-50, for example – they are indented correctly).

Unfortunately, errors produced by JSON schema validation engine in IntelliJ sometimes don't point at the problem exactly, nor do they provide a detailed description of what was expected vs what was found.

I hope that one day we will come up with a better validation tool, but for now this is what we've got.

Let me know if this helped.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events