Skip to content

fix: reintroduce extended attributes support in jsonschema exporter - #563

Merged
erikbosch merged 3 commits into
COVESA:masterfrom
Communauto:ReintroduceSupportForExtraAttributesInJsonSchemaMaster
Sep 11, 2026
Merged

erikbosch merged 3 commits into
COVESA:masterfrom
Communauto:ReintroduceSupportForExtraAttributesInJsonSchemaMaster

Conversation

@sebroy-oti

@sebroy-oti sebroy-oti commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor
  • Reintroduce processing of extended attributes in jsonschema export. The functionality had disappeared between 5.0 and 6.0 in this commit: 526754f
  • Group extra attributes inside a x-extra object containing all the mappings, as requested by Sebastian Schleemilch
  • Update doc accordingly.

@sebroy-oti sebroy-oti changed the title fix: reintroduce extra attributes support in jsonschema fix: reintroduce extended attributes support in jsonschema Sep 9, 2026
Sébastien Roy added 2 commits September 9, 2026 11:35
Signed-off-by: Sébastien Roy <sroy@orthogone.com>
Signed-off-by: Sébastien Roy <sroy@orthogone.com>
@sebroy-oti
sebroy-oti force-pushed the ReintroduceSupportForExtraAttributesInJsonSchemaMaster branch from 1877684 to 5d902ab Compare September 9, 2026 15:35
@sebroy-oti sebroy-oti changed the title fix: reintroduce extended attributes support in jsonschema fix: reintroduce extended attributes support in jsonschema exporter Sep 9, 2026
Comment thread src/vss_tools/exporters/jsonschema.py Outdated
if extend_all_attributes:
add_x_attributes(schema, node)
for field in vss_data.get_extra_attributes():
schema[field] = getattr(vss_data, field)

@sschleemilch sschleemilch Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would group them in e.g a x-extra object to make it explicit that those properties are not related to a JSON schema and to avoid possible conflicts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added. I originally left it as it was in 5.0 to avoid breaking changes, but I agree it's better to group those custom fields separately.

Signed-off-by: Sébastien Roy <sroy@orthogone.com>
@erikbosch

Copy link
Copy Markdown
Collaborator

We are preparing the 6.1 release, and are currently at the state with release candidates. Do you see this as a fix that better should be included also in 6.1 (and not just the release following 6.1)

@sebroy-oti

Copy link
Copy Markdown
Contributor Author

We are preparing the 6.1 release, and are currently at the state with release candidates. Do you see this as a fix that better should be included also in 6.1 (and not just the release following 6.1)

We recently bumped vss-tools to 6.0 in our solution and had to create a fork that includes this fix as we require custom attributes to be accessible in the generated JSON Schema. In our case, it would be preferable if this fix made it into 6.1 so we could drop our vss-tools fork and use upstream 6.1. However, it's not essential it makes it to 6.1, as we can continue using a fork until the release following 6.1.

@erikbosch

Copy link
Copy Markdown
Collaborator

Thanks @sebroy-oti - I think there will be no problem to include it. I will take a look at it and possibly then create a new release candidate later today or early next week including it

@erikbosch
erikbosch merged commit 6bf7c86 into COVESA:master Sep 11, 2026
5 checks passed
erikbosch pushed a commit that referenced this pull request Sep 11, 2026
…563)

* Reintroduce extra attributes support in jsonschema

Signed-off-by: Sébastien Roy <sroy@orthogone.com>

* Fix trailing whitespaces

Signed-off-by: Sébastien Roy <sroy@orthogone.com>

* Group extra attributes in an x-extra object.t

Signed-off-by: Sébastien Roy <sroy@orthogone.com>

---------

Signed-off-by: Sébastien Roy <sroy@orthogone.com>
Co-authored-by: Sébastien Roy <sroy@orthogone.com>
@erikbosch

Copy link
Copy Markdown
Collaborator

Merged and cherry-picked to 6.1 branch. I created a new release candidate for 6.1 vss-tools (but have not yet created a new vss release candidate referencing it).

How to install the release candidate:

pip install --upgrade --pre vss-tools==6.1.0rc3

ansgarradermacher pushed a commit to ansgarradermacher/vss-tools that referenced this pull request Oct 7, 2026
…OVESA#563)

* Reintroduce extra attributes support in jsonschema

Signed-off-by: Sébastien Roy <sroy@orthogone.com>

* Fix trailing whitespaces

Signed-off-by: Sébastien Roy <sroy@orthogone.com>

* Group extra attributes in an x-extra object.t

Signed-off-by: Sébastien Roy <sroy@orthogone.com>

---------

Signed-off-by: Sébastien Roy <sroy@orthogone.com>
Co-authored-by: Sébastien Roy <sroy@orthogone.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants