Altinn / Altinn/app-frontend-react

Disable "additionalProperties" validation for custom components

Open
#3,032 0 comments 0 reactions 0 assignees View on GitHub
kind/bug
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description of the bug

Custom components support adding custom/additional properties, which is beneficial. However, the "additionalProperties" validation triggers error logging and prevents the components from displaying in the GUI.

### Steps To Reproduce

```json
{
"id": "metadata-version",
"type": "Custom",
"tagName": "custom-field-data",
"hereIsAnAdditionalProperty": "value for the additional property",
"dataModelBindings": {
"simpleBinding": "metadata.version"
},
"textResourceBindings": {
"title": "resource.metadata.version.title"
}
}
```

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied custom-component JSON and tracing the additionalProperties validation that logs the error and prevents the component from displaying in the GUI. Done means custom components accept extra properties and render without that validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
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.