Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate subobjects and set and validate the given logo #177

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions Installation/Mapping/oc.githubPubliccodeComponent.mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "GithubPubliccodeToComponent",
"$id": "https://api.github.com/oc.githubPubliccodeComponent.mapping.json",
"$schema": "https://docs.commongateway.nl/schemas/Mapping.schema.json",
"version": "0.0.6",
"version": "0.0.7",
"passTrough": false,
"mapping": {
"softwareVersion": "publiccodeYmlVersion",
Expand All @@ -13,6 +13,7 @@
"isBasedOn": "isBasedOn",
"releaseDate": "releaseDate",
"logo": "logo",
"monochromeLogo": "monochromeLogo",
"roadmap": "roadmap",
"inputTypes": "inputTypes",
"outputTypes": "outputTypes",
Expand All @@ -33,15 +34,17 @@
"maintenance.type": "maintenance.type",
"localisation.localisationReady": "localisation.localisationReady",
"localisation.availableLanguages": "localisation.availableLanguages",
"dependsOn.open": "dependsOn.open",
"dependsOn.proprietary": "dependsOn.proprietary",
"dependsOn.hardware": "dependsOn.hardware",
"nl.countryExtensionVersion": "nl.countryExtensionVersion",
"nl.commonground.intendedOrganisations": "nl.commonground.intendedOrganisations",
"nl.commonground.installationType": "nl.commonground.installationType",
"nl.commonground.layerType": "nl.commonground.layerType",
"nl.gemma.bedrijfsfuncties": "nl.gemma.bedrijfsfuncties",
"nl.gemma.bedrijfsservices": "nl.gemma.bedrijfsservices",
"nl.gemma.applicatiefunctie": "nl.gemma.applicatiefunctie",
"nl.gemma.model": "nl.gemma.model",
"nl.gemma.referentieComponenten": "nl.gemma.referentieComponenten",
"nl.apm": "nl.apm",
"nl.upl": "nl.upl",
"downloads": "[{% if downloadUrls|default %}{% for url in downloadUrls%}{% if not loop.first %},{% endif %}{\"url\": \"{{ url }}\"}{% endfor %}{% endif %}]"
},
Expand Down Expand Up @@ -81,6 +84,10 @@
"localisation.localisationReady": "keyCantBeValue",
"localisation.availableLanguages": "keyCantBeValue",
"localisation": "unsetIfValue==",
"dependsOn.open": "keyCantBeValue",
"dependsOn.proprietary": "keyCantBeValue",
"dependsOn.hardware": "keyCantBeValue",
"nl.countryExtensionVersion": "keyCantBeValue",
"nl.commonground.intendedOrganisations": "keyCantBeValue",
"nl.commonground.installationType": "keyCantBeValue",
"nl.commonground.layerType": "keyCantBeValue",
Expand All @@ -89,9 +96,7 @@
"nl.gemma.bedrijfsservices": "keyCantBeValue",
"nl.gemma.applicatiefunctie": "keyCantBeValue",
"nl.gemma.model": "keyCantBeValue",
"nl.gemma.referentieComponenten": "keyCantBeValue",
"nl.gemma": "unsetIfValue==",
"nl.apm": "keyCantBeValue",
"nl.upl": "keyCantBeValue",
"nl": "unsetIfValue==",
"applicationSuite.name": "unsetIfValue==applicationSuite",
Expand Down
10 changes: 9 additions & 1 deletion Installation/Schema/Component.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"title": "Component",
"$id": "https://opencatalogi.nl/oc.component.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.7",
"version": "0.1.8",
"type": "object",
"description": "Based on the [top level component](https://yml.publiccode.tools/schema.core.html#top-level-keys-and-sections) of public code. represent a pease of software that may iether be standalone or part of a larger application.\n\n**The PublicCode standard has been extenden for this API in te following way's**\n- To the `type` property the following enums where added\n- - Api\n- - Schema\n- - Data\n- The `inputType` property was used (its depracticed in PublicCode)\n- The `outputType` property was uses (its depracticed in PublicCode)\n- The `nl` country exenstion was added in line with the [PublicCode country extensions](https://yml.publiccode.tools/country.html) guidelines\n- applicationId was added for the codebase repository (like a github repository id).",
"properties": {
"publiccodeYmlVersion": {
"type": "string"
},
"applicationId": {
"type": "string",
"example": "487842915"
Expand Down Expand Up @@ -51,6 +54,11 @@
"description": "This key contains the path to the logo of the software. Logos should be in vector format; raster formats are only allowed as a fallback. In this case, they should be transparent PNGs, minimum 1000px of width. The key value can be the relative path to the file starting from the root of the repository, or it can be an absolute URL pointing to the logo in raw version. In both cases, the file must reside inside the same repository where the publiccode.yml file is stored.",
"example": "https://avatars0.githubusercontent.com/u/34739001?s=280&v=4"
},
"monochromeLogo": {
"type": "string",
"description": "A monochromatic (black) logo. The logo should be in vector format; raster formats are only allowed as a fallback. In this case, they should be transparent PNGs, minimum 1000px of width. The key value can be the relative path to the file starting from the root of the repository, or it can be an absolute URL pointing to the logo in raw version. In both cases, the file must reside inside the same repository where the publiccode.yml file is stored.",
"example": "img/logo-mono.svg"
},
"platforms": {
"type": "array",
"description": "This key specifies which platform the software runs on. It is meant to describe the platforms that users will use to access and operate the software, rather than the platform the software itself runs on.\n\nUse the predefined values if possible. If the software runs on a platform for which a predefined value is not available, a different value can be used.",
Expand Down
8 changes: 5 additions & 3 deletions Installation/Schema/Contractor.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Contractor",
"$id": "https://opencatalogi.nl/oc.contractor.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.2",
"version": "0.1.3",
"type": "object",
"properties": {
"organisation": {
Expand All @@ -12,10 +12,12 @@
"until": {
"type": "string",
"description": "This is a date (YYYY-MM-DD). This key must contain the date at which the maintenance is going to end. In case of community maintenance, the value should not be more than 2 years in the future, and thus will need to be regularly updated as the community continues working on the project.",
"format": "date"
"format": "date",
"required": true
}
},
"required": [
"organisation"
"organisation",
"until"
]
}
17 changes: 15 additions & 2 deletions Installation/Schema/Dependency.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@
"title": "Dependency",
"$id": "https://opencatalogi.nl/oc.dependency.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.0",
"version": "0.1.1",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string",
"required": true
},
"versionMin": {
"type": "string"
},
"versionMax": {
"type": "string"
},
"version": {
"type": "string"
},
"optional": {
"type": "boolean"
}
}
},
"required": [
"name"
]
}
10 changes: 8 additions & 2 deletions Installation/Schema/Description.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Description",
"$id": "https://opencatalogi.nl/oc.description.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.0",
"version": "0.1.1",
"type": "object",
"properties": {
"id": {
Expand All @@ -14,6 +14,12 @@
"description": "This key is an opportunity to localise the name in a specific language. It contains the (short) public name of the product. It should be the name most people usually refer to the software. In case the software has both an internal “code” name and a commercial name, use the commercial name.",
"example": "Medusa"
},
"genericName": {
"type": "string",
"description": "This key is the “Generic name”, which refers to the specific category to which the software belongs. You can usually find the generic name in the presentation of the software, when you write: “Software xxx is a yyy”. Notable examples include “Text Editor”, “Word Processor”, “Web Browser”, “Chat” and so on… The generic name can be up to 35 characters long.",
"example": "Web Browser",
"required": true
},
"shortDescription": {
"type": "string",
"maxLength": 150,
Expand Down Expand Up @@ -70,4 +76,4 @@
"required": [
"features"
]
}
}
10 changes: 2 additions & 8 deletions Installation/Schema/Gemma.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Gemma",
"$id": "https://opencatalogi.nl/oc.gemma.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.0",
"version": "0.1.1",
"type": "object",
"properties": {
"bedrijfsfuncties": {
Expand Down Expand Up @@ -30,12 +30,6 @@
"Fysiek"
],
"example": "Semantisch"
},
"referentieComponenten": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
8 changes: 5 additions & 3 deletions Installation/Schema/Localisation.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Localisation",
"$id": "https://opencatalogi.nl/oc.localisation.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.0",
"version": "0.1.1",
"type": "object",
"description": "This section provides an overview of the localization features of the software.",
"properties": {
Expand All @@ -13,11 +13,13 @@
},
"availableLanguages": {
"type": "array",
"required": true,
"description": "If present, this is the list of languages in which the software is available. Of course, this list will contain at least one language. The primary language subtag cannot be omitted, as mandated by the BCP 47.\n",
"items": {}
}
},
"required": [
"localisationReady"
"localisationReady",
"availableLanguages"
]
}
}
8 changes: 4 additions & 4 deletions Installation/Schema/Maintenance.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Maintenance",
"$id": "https://opencatalogi.nl/oc.maintenance.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.0",
"version": "0.1.1",
"type": "object",
"description": "This section provides information on the maintenance status of the software, useful to evaluate whether the software is actively developed or not.",
"properties": {
Expand All @@ -20,13 +20,13 @@
},
"contractors": {
"type": "array",
"description": "This key describes the entity or entities, if any, that are currently contracted for maintaining the software. They can be companies, organizations, or other collective names.",
"description": "This key describes the entity or entities, if any, that are currently contracted for maintaining the software. They can be companies, organizations, or other collective names. Presence: mandatory (if maintenance/type is contract)",
"items": {
"$ref": "https://opencatalogi.nl/oc.contractor.schema.json"
}
},
"contacts": {
"description": "One or more contacts maintaining this software.\n\nThis key describes the technical people currently responsible for maintaining the software. All contacts need to be a physical person, not a company or an organisation. If somebody is acting as a representative of an institution, it must be listed within the affiliation of the contact.\n\nIn case of a commercial agreement (or a chain of such agreements), specify the final entities actually contracted to deliver the maintenance. Do not specify the software owner unless it is technically involved with the maintenance of the product as well.",
"description": "One or more contacts maintaining this software.\n\nThis key describes the technical people currently responsible for maintaining the software. All contacts need to be a physical person, not a company or an organisation. If somebody is acting as a representative of an institution, it must be listed within the affiliation of the contact.\n\nIn case of a commercial agreement (or a chain of such agreements), specify the final entities actually contracted to deliver the maintenance. Do not specify the software owner unless it is technically involved with the maintenance of the product as well. Presence: mandatory (if maintenance/type is internal or community)",
"type": "array",
"items": {
"$ref": "https://opencatalogi.nl/oc.contact.schema.json"
Expand All @@ -36,4 +36,4 @@
"required": [
"type"
]
}
}
8 changes: 4 additions & 4 deletions Installation/Schema/Nl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"title": "Nl",
"$id": "https://opencatalogi.nl/oc.nl.schema.json",
"$schema": "https://docs.commongateway.nl/schemas/Entity.schema.json",
"version": "0.1.0",
"version": "0.1.1",
"type": "object",
"description": "Extension to the publiccode standard for the netherlands by [vng](https://vng.nl/) in accordance with the publiccode [Country-Specific Sections](https://yml.publiccode.tools/country.html)",
"properties": {
"countryExtensionVersion": {
"type": "string"
},
"commonground": {
"$ref": "https://opencatalogi.nl/oc.commonground.schema.json"
},
"gemma": {
"$ref": "https://opencatalogi.nl/oc.gemma.schema.json"
},
"apm": {
"type": "object"
},
"upl": {
"type": "array",
"items": {
Expand Down
2 changes: 1 addition & 1 deletion src/Service/FormInputService.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function updateRepositoryWithFormInput(?array $data=[], ?array $configura
if (isset($repository) === false
|| $repository === null
) {
$this->data['response'] = new Response('Repository is not created.', 404, ['Content-Type' => 'application/json']);
$this->data['response'] = new Response('Repository is not created. See logs for more detail.', 404, ['Content-Type' => 'application/json']);

return $this->data;
}
Expand Down
Loading