publiccode-editor
publiccode-editor copied to clipboard
Import failed when attributes have the wrong format
Hello,
we've the problem that some developers of our plattform create the publiccode.yaml manually. When the publicode.yaml
hasn't the correct format, the editor will crash when the developer tries to upload the publicode.yaml
for validation.
Steps to reproduce
Create a publiccode.yaml
but use a string instead of a list on the description.en.feature
attribute.
The Editor will crash and not load anything
# This repository adheres to the publiccode.yml standard by including this
# metadata file that makes public software easily discoverable.
# More info at https://github.com/italia/publiccode.yml
publiccodeYmlVersion: "0.5"
name: Testapp
url: "https://gitlab.opencode.de/test/testapp"
releaseDate: "2023-07-01"
softwareVersion: "1.0"
platforms:
- linux
categories:
- data-analytics
- data-visualization
developmentStatus: stable
softwareType: standalone/other
en:
countryExtensionVersion: "0.2"
maintenance:
type: community
contacts:
- name: Test
email: [email protected]
contractors:
- name: Test
website: "https://www.test.com/"
legal:
license: EUPL
mainCopyrightOwner: ITDZ
repoOwner: ITDZ
localisation:
localisationReady: false
availableLanguages:
- en
description:
en:
genericName: DSGVO compliant test app
shortDescription: DSGVO compliant test app description short
longDescription: |
DSGVO compliant test app description long
features: "Test Feature"
When you can the line
features: "Test Feature"
to
features:
- "Test Feature"
Expected behaviour
Show the yaml file and mark the line/lines that throw the error. This would give the user a hint where the error in his file is.
Actual behaviour
The Editor crashs and show's nothing.