From 844f349c902810323c950ea1a412b7ab23e89395 Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Fri, 14 Jun 2024 20:53:23 +0200 Subject: [PATCH] feat: support publiccode.yml Standard v0.4.0 Fix #192. --- parser.go | 2 +- parser_test.go | 9 ++-- publiccode.go | 2 +- .../invalid/applicationSuite_wrong_type.yml | 2 +- testdata/v0/invalid/categories_empty.yml | 2 +- testdata/v0/invalid/categories_invalid.yml | 2 +- testdata/v0/invalid/categories_missing.yml | 2 +- testdata/v0/invalid/categories_nil.yml | 2 +- .../dependsOn_open_name_wrong_type.yml | 2 +- .../dependsOn_open_optional_wrong_type.yml | 2 +- .../dependsOn_open_versionMax_wrong_type.yml | 2 +- .../dependsOn_open_versionMin_wrong_type.yml | 2 +- .../dependsOn_open_version_wrong_type.yml | 2 +- ...scription_eng_apiDocumentation_invalid.yml | 2 +- ...iption_eng_apiDocumentation_wrong_type.yml | 2 +- .../description_eng_awards_wrong_type.yml | 2 +- .../description_eng_documentation_invalid.yml | 2 +- ...scription_eng_documentation_wrong_type.yml | 2 +- .../description_eng_features_empty.yml | 2 +- .../description_eng_features_missing.yml | 2 +- .../description_eng_genericName_too_long.yml | 2 +- ...scription_eng_localisedName_wrong_type.yml | 2 +- ...escription_eng_longDescription_missing.yml | 2 +- ...scription_eng_longDescription_too_long.yml | 2 +- ...cription_eng_longDescription_too_short.yml | 2 +- ...escription_too_short_grapheme_clusters.yml | 2 +- ...scription_eng_screenshots_missing_file.yml | 2 +- ...scription_eng_shortDescription_missing.yml | 2 +- .../description_eng_videos_invalid.yml | 2 +- .../description_eng_videos_invalid_oembed.yml | 2 +- .../invalid/description_invalid_language.yml | 2 +- .../v0/invalid/developmentStatus_invalid.yml | 2 +- .../v0/invalid/developmentStatus_missing.yml | 2 +- .../invalid/developmentStatus_wrong_type.yml | 2 +- testdata/v0/invalid/file_encoding.yml | 2 +- testdata/v0/invalid/inputTypes_invalid.yml | 2 +- testdata/v0/invalid/inputTypes_wrong_type.yml | 2 +- ...ndedAudience_countries_invalid_country.yml | 2 +- .../intendedAudience_countries_wrong_type.yml | 2 +- .../intendedAudience_scope_invalid_scope.yml | 2 +- .../intendedAudience_scope_wrong_type.yml | 2 +- ...e_unsupportedCountries_invalid_country.yml | 2 +- ...dience_unsupportedCountries_wrong_type.yml | 2 +- .../invalid/intendedAudience_wrong_type.yml | 2 +- testdata/v0/invalid/invalid_yaml.yml | 2 +- testdata/v0/invalid/isBasedOn_wrong_type.yml | 2 +- .../v0/invalid/it_riuso_codiceIPA_invalid.yml | 2 +- testdata/v0/invalid/landingURL_invalid.yml | 2 +- testdata/v0/invalid/landingURL_wrong_type.yml | 2 +- .../legal_authorsFile_missing_file.yml | 2 +- testdata/v0/invalid/legal_license_invalid.yml | 2 +- testdata/v0/invalid/legal_license_missing.yml | 2 +- testdata/v0/invalid/legal_missing.yml | 2 +- testdata/v0/invalid/legal_wrong_type.yml | 2 +- .../localisation_availableLanguages_empty.yml | 2 +- ...ocalisation_availableLanguages_invalid.yml | 2 +- ...ilableLanguages_invalid_bcp47.yml.disabled | 2 +- ...ocalisation_availableLanguages_missing.yml | 2 +- ...localisation_localisationReady_missing.yml | 2 +- testdata/v0/invalid/logo_missing_file.yml | 2 +- .../v0/invalid/logo_unsupported_extension.yml | 2 +- testdata/v0/invalid/logo_wrong_type.yml | 2 +- .../maintenance_contacts_email_invalid.yml | 2 +- ...e_contacts_missing_with_type_community.yml | 2 +- ...ce_contacts_missing_with_type_internal.yml | 2 +- .../maintenance_contacts_name_missing.yml | 2 +- .../maintenance_contractors_email_invalid.yml | 2 +- .../maintenance_contractors_invalid_type.yml | 2 +- ...contractors_missing_with_type_contract.yml | 2 +- .../maintenance_contractors_name_missing.yml | 2 +- .../maintenance_contractors_until_invalid.yml | 2 +- .../maintenance_contractors_until_missing.yml | 2 +- ...aintenance_contractors_website_invalid.yml | 2 +- .../v0/invalid/maintenance_type_invalid.yml | 2 +- .../v0/invalid/maintenance_type_missing.yml | 2 +- .../invalid/monochromeLogo_missing_file.yml | 2 +- .../monochromeLogo_unsupported_extension.yml | 2 +- .../v0/invalid/monochromeLogo_wrong_type.yml | 2 +- testdata/v0/invalid/mostly_empty.yml | 2 +- testdata/v0/invalid/name_missing.yml | 2 +- testdata/v0/invalid/name_nil.yml | 2 +- testdata/v0/invalid/name_wrong_type.yml | 2 +- .../invalid/no-network/landingURL_invalid.yml | 2 +- .../invalid/no-network/logo_invalid_png.yml | 2 +- .../invalid/no-network/logo_missing_file.yml | 2 +- .../no-network/monochromeLogo_invalid_png.yml | 2 +- testdata/v0/invalid/outputTypes_invalid.yml | 2 +- .../v0/invalid/outputTypes_wrong_type.yml | 2 +- testdata/v0/invalid/platforms_missing.yml | 2 +- testdata/v0/invalid/platforms_wrong_type.yml | 2 +- .../invalid/publiccodeYmlVersion_missing.yml | 2 +- testdata/v0/invalid/releaseDate_invalid.yml | 2 +- testdata/v0/invalid/releaseDate_missing.yml | 2 +- .../v0/invalid/releaseDate_wrong_type.yml | 2 +- testdata/v0/invalid/roadmap_invalid.yml | 2 +- testdata/v0/invalid/roadmap_wrong_type.yml | 2 +- testdata/v0/invalid/softwareType_invalid.yml | 2 +- testdata/v0/invalid/softwareType_missing.yml | 2 +- .../v0/invalid/softwareType_wrong_type.yml | 2 +- .../v0/invalid/softwareVersion_wrong_type.yml | 2 +- testdata/v0/invalid/url_invalid.yml | 2 +- testdata/v0/invalid/url_missing.yml | 2 +- testdata/v0/invalid/url_wrong_type.yml | 2 +- testdata/v0/invalid/usedBy_wrong_type.yml | 2 +- testdata/v0/valid/dependsOn.yml | 2 +- .../v0/valid/maintenance_contacts_phone.yml | 2 +- testdata/v0/valid/no-network/dependsOn.yml | 2 +- testdata/v0/valid/no-network/valid.yml | 2 +- testdata/v0/valid/valid.minimal.yml | 2 +- testdata/v0/valid/valid.yml | 2 +- .../unicode_grapheme_clusters.yml | 2 +- .../valid.minimal.v0.3.yml | 51 +++++++++++++++++++ v0.go | 2 +- 113 files changed, 168 insertions(+), 114 deletions(-) create mode 100644 testdata/v0/valid_with_warnings/valid.minimal.v0.3.yml diff --git a/parser.go b/parser.go index f0b78c3..8ff594e 100644 --- a/parser.go +++ b/parser.go @@ -132,7 +132,7 @@ func (p *Parser) ParseStream(in io.Reader) (PublicCode, error) { var ve ValidationResults - if slices.Contains(SupportedVersions, version.Value) && !strings.HasPrefix(version.Value, "0.3") { + if slices.Contains(SupportedVersions, version.Value) && !strings.HasPrefix(version.Value, "0.4") { latestVersion := SupportedVersions[len(SupportedVersions)-1] line, column := getPositionInFile("publiccodeYmlVersion", node) diff --git a/parser_test.go b/parser_test.go index f874885..ad595f9 100644 --- a/parser_test.go +++ b/parser_test.go @@ -131,7 +131,7 @@ func TestInvalidTestcasesV0(t *testing.T) { "publiccodeYmlVersion_invalid.yml": ValidationResults{ ValidationError{ "publiccodeYmlVersion", - "unsupported version: '1'. Supported versions: 0.2, 0.2.0, 0.2.1, 0.2.2, 0.3, 0.3.0", + "unsupported version: '1'. Supported versions: 0.2, 0.2.0, 0.2.1, 0.2.2, 0.3, 0.3.0, 0.4, 0.4.0", 0, 0, }, @@ -558,7 +558,10 @@ func TestValidWithWarningsTestcasesV0(t *testing.T) { ValidationWarning{"description.eng.genericName", "This key is DEPRECATED and will be removed in the future", 23, 5}, }, "valid.minimal.v0.2.yml": ValidationResults{ - ValidationWarning{"publiccodeYmlVersion", "v0.2 is not the latest version, use '0.3.0'. Parsing this file as v0.3.0.", 1, 1}, + ValidationWarning{"publiccodeYmlVersion", "v0.2 is not the latest version, use '0.4.0'. Parsing this file as v0.4.0.", 1, 1}, + }, + "valid.minimal.v0.3.yml": ValidationResults{ + ValidationWarning{"publiccodeYmlVersion", "v0.3 is not the latest version, use '0.4.0'. Parsing this file as v0.4.0.", 1, 1}, }, } @@ -580,7 +583,7 @@ func TestDecodeValueErrorsRemote(t *testing.T) { testRemoteFiles := []testType{ {"https://raw.githubusercontent.com/italia/publiccode-editor/master/publiccode.yml", ValidationResults{ ValidationWarning{ - "publiccodeYmlVersion", "v0.2 is not the latest version, use '0.3.0'. Parsing this file as v0.3.0.", 1, 1, + "publiccodeYmlVersion", "v0.2 is not the latest version, use '0.4.0'. Parsing this file as v0.4.0.", 1, 1, }, ValidationWarning{"description.it.genericName", "This key is DEPRECATED and will be removed in the future", 12, 5}, }}, diff --git a/publiccode.go b/publiccode.go index 1dfe3ac..59846b8 100644 --- a/publiccode.go +++ b/publiccode.go @@ -1,7 +1,7 @@ package publiccode // SupportedVersions lists the publiccode.yml versions this parser supports. -var SupportedVersions = []string{"0.2", "0.2.0", "0.2.1", "0.2.2", "0.3", "0.3.0"} +var SupportedVersions = []string{"0.2", "0.2.0", "0.2.1", "0.2.2", "0.3", "0.3.0", "0.4", "0.4.0"} type PublicCode interface { Version() uint diff --git a/testdata/v0/invalid/applicationSuite_wrong_type.yml b/testdata/v0/invalid/applicationSuite_wrong_type.yml index 8af7b93..1bb5cf5 100644 --- a/testdata/v0/invalid/applicationSuite_wrong_type.yml +++ b/testdata/v0/invalid/applicationSuite_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" # Should NOT validate: applicationSuite must be a string applicationSuite: [] diff --git a/testdata/v0/invalid/categories_empty.yml b/testdata/v0/invalid/categories_empty.yml index 7f53944..e656593 100644 --- a/testdata/v0/invalid/categories_empty.yml +++ b/testdata/v0/invalid/categories_empty.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/categories_invalid.yml b/testdata/v0/invalid/categories_invalid.yml index 37a7431..b0a3cee 100644 --- a/testdata/v0/invalid/categories_invalid.yml +++ b/testdata/v0/invalid/categories_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/categories_missing.yml b/testdata/v0/invalid/categories_missing.yml index 29853bd..6e45839 100644 --- a/testdata/v0/invalid/categories_missing.yml +++ b/testdata/v0/invalid/categories_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/categories_nil.yml b/testdata/v0/invalid/categories_nil.yml index b62e5a0..0e025ec 100644 --- a/testdata/v0/invalid/categories_nil.yml +++ b/testdata/v0/invalid/categories_nil.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/dependsOn_open_name_wrong_type.yml b/testdata/v0/invalid/dependsOn_open_name_wrong_type.yml index 108b383..79b9b1a 100644 --- a/testdata/v0/invalid/dependsOn_open_name_wrong_type.yml +++ b/testdata/v0/invalid/dependsOn_open_name_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/dependsOn_open_optional_wrong_type.yml b/testdata/v0/invalid/dependsOn_open_optional_wrong_type.yml index f699c47..772cabb 100644 --- a/testdata/v0/invalid/dependsOn_open_optional_wrong_type.yml +++ b/testdata/v0/invalid/dependsOn_open_optional_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/dependsOn_open_versionMax_wrong_type.yml b/testdata/v0/invalid/dependsOn_open_versionMax_wrong_type.yml index 2583beb..3efcebd 100644 --- a/testdata/v0/invalid/dependsOn_open_versionMax_wrong_type.yml +++ b/testdata/v0/invalid/dependsOn_open_versionMax_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/dependsOn_open_versionMin_wrong_type.yml b/testdata/v0/invalid/dependsOn_open_versionMin_wrong_type.yml index c9c4b46..68b2aac 100644 --- a/testdata/v0/invalid/dependsOn_open_versionMin_wrong_type.yml +++ b/testdata/v0/invalid/dependsOn_open_versionMin_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/dependsOn_open_version_wrong_type.yml b/testdata/v0/invalid/dependsOn_open_version_wrong_type.yml index ca9031d..7c278aa 100644 --- a/testdata/v0/invalid/dependsOn_open_version_wrong_type.yml +++ b/testdata/v0/invalid/dependsOn_open_version_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_apiDocumentation_invalid.yml b/testdata/v0/invalid/description_eng_apiDocumentation_invalid.yml index e50b022..0204124 100644 --- a/testdata/v0/invalid/description_eng_apiDocumentation_invalid.yml +++ b/testdata/v0/invalid/description_eng_apiDocumentation_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/description_eng_apiDocumentation_wrong_type.yml b/testdata/v0/invalid/description_eng_apiDocumentation_wrong_type.yml index b3a7efd..16ef4fc 100644 --- a/testdata/v0/invalid/description_eng_apiDocumentation_wrong_type.yml +++ b/testdata/v0/invalid/description_eng_apiDocumentation_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/description_eng_awards_wrong_type.yml b/testdata/v0/invalid/description_eng_awards_wrong_type.yml index fc22f28..a94acfc 100644 --- a/testdata/v0/invalid/description_eng_awards_wrong_type.yml +++ b/testdata/v0/invalid/description_eng_awards_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_documentation_invalid.yml b/testdata/v0/invalid/description_eng_documentation_invalid.yml index e59f8d1..401a2d5 100644 --- a/testdata/v0/invalid/description_eng_documentation_invalid.yml +++ b/testdata/v0/invalid/description_eng_documentation_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/description_eng_documentation_wrong_type.yml b/testdata/v0/invalid/description_eng_documentation_wrong_type.yml index fd8c26f..7d9ed9d 100644 --- a/testdata/v0/invalid/description_eng_documentation_wrong_type.yml +++ b/testdata/v0/invalid/description_eng_documentation_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/description_eng_features_empty.yml b/testdata/v0/invalid/description_eng_features_empty.yml index a20f1bc..3511414 100644 --- a/testdata/v0/invalid/description_eng_features_empty.yml +++ b/testdata/v0/invalid/description_eng_features_empty.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_features_missing.yml b/testdata/v0/invalid/description_eng_features_missing.yml index 156ee6e..7d30641 100644 --- a/testdata/v0/invalid/description_eng_features_missing.yml +++ b/testdata/v0/invalid/description_eng_features_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_genericName_too_long.yml b/testdata/v0/invalid/description_eng_genericName_too_long.yml index b2be974..a422aff 100644 --- a/testdata/v0/invalid/description_eng_genericName_too_long.yml +++ b/testdata/v0/invalid/description_eng_genericName_too_long.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_localisedName_wrong_type.yml b/testdata/v0/invalid/description_eng_localisedName_wrong_type.yml index a54246a..c4bdd35 100644 --- a/testdata/v0/invalid/description_eng_localisedName_wrong_type.yml +++ b/testdata/v0/invalid/description_eng_localisedName_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_longDescription_missing.yml b/testdata/v0/invalid/description_eng_longDescription_missing.yml index cf2ff3d..9b07724 100644 --- a/testdata/v0/invalid/description_eng_longDescription_missing.yml +++ b/testdata/v0/invalid/description_eng_longDescription_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_longDescription_too_long.yml b/testdata/v0/invalid/description_eng_longDescription_too_long.yml index 7e72d5d..8c61f16 100644 --- a/testdata/v0/invalid/description_eng_longDescription_too_long.yml +++ b/testdata/v0/invalid/description_eng_longDescription_too_long.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_longDescription_too_short.yml b/testdata/v0/invalid/description_eng_longDescription_too_short.yml index 54c1296..3324c42 100644 --- a/testdata/v0/invalid/description_eng_longDescription_too_short.yml +++ b/testdata/v0/invalid/description_eng_longDescription_too_short.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_longDescription_too_short_grapheme_clusters.yml b/testdata/v0/invalid/description_eng_longDescription_too_short_grapheme_clusters.yml index 2b58889..6562a12 100644 --- a/testdata/v0/invalid/description_eng_longDescription_too_short_grapheme_clusters.yml +++ b/testdata/v0/invalid/description_eng_longDescription_too_short_grapheme_clusters.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_screenshots_missing_file.yml b/testdata/v0/invalid/description_eng_screenshots_missing_file.yml index 780ea3a..270f6bc 100644 --- a/testdata/v0/invalid/description_eng_screenshots_missing_file.yml +++ b/testdata/v0/invalid/description_eng_screenshots_missing_file.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_shortDescription_missing.yml b/testdata/v0/invalid/description_eng_shortDescription_missing.yml index a35d161..6931b91 100644 --- a/testdata/v0/invalid/description_eng_shortDescription_missing.yml +++ b/testdata/v0/invalid/description_eng_shortDescription_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_videos_invalid.yml b/testdata/v0/invalid/description_eng_videos_invalid.yml index 5b200cf..071cf81 100644 --- a/testdata/v0/invalid/description_eng_videos_invalid.yml +++ b/testdata/v0/invalid/description_eng_videos_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_eng_videos_invalid_oembed.yml b/testdata/v0/invalid/description_eng_videos_invalid_oembed.yml index 971a28c..ca4dd3c 100644 --- a/testdata/v0/invalid/description_eng_videos_invalid_oembed.yml +++ b/testdata/v0/invalid/description_eng_videos_invalid_oembed.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/description_invalid_language.yml b/testdata/v0/invalid/description_invalid_language.yml index e8e8b09..b3dfd1f 100644 --- a/testdata/v0/invalid/description_invalid_language.yml +++ b/testdata/v0/invalid/description_invalid_language.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/developmentStatus_invalid.yml b/testdata/v0/invalid/developmentStatus_invalid.yml index 21e2990..9e4df8d 100644 --- a/testdata/v0/invalid/developmentStatus_invalid.yml +++ b/testdata/v0/invalid/developmentStatus_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/developmentStatus_missing.yml b/testdata/v0/invalid/developmentStatus_missing.yml index 931d876..e68b2de 100644 --- a/testdata/v0/invalid/developmentStatus_missing.yml +++ b/testdata/v0/invalid/developmentStatus_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/developmentStatus_wrong_type.yml b/testdata/v0/invalid/developmentStatus_wrong_type.yml index c21b3c1..43d1650 100644 --- a/testdata/v0/invalid/developmentStatus_wrong_type.yml +++ b/testdata/v0/invalid/developmentStatus_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/file_encoding.yml b/testdata/v0/invalid/file_encoding.yml index 7225812..039c051 100644 --- a/testdata/v0/invalid/file_encoding.yml +++ b/testdata/v0/invalid/file_encoding.yml @@ -1,6 +1,6 @@ # This file is ISO-8859-1 èñçödëd thus not a valid publiccode.yml. -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/inputTypes_invalid.yml b/testdata/v0/invalid/inputTypes_invalid.yml index 578fe38..05c3d33 100644 --- a/testdata/v0/invalid/inputTypes_invalid.yml +++ b/testdata/v0/invalid/inputTypes_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/inputTypes_wrong_type.yml b/testdata/v0/invalid/inputTypes_wrong_type.yml index 03b9b21..2d467e2 100644 --- a/testdata/v0/invalid/inputTypes_wrong_type.yml +++ b/testdata/v0/invalid/inputTypes_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_countries_invalid_country.yml b/testdata/v0/invalid/intendedAudience_countries_invalid_country.yml index aad8882..3daa9bc 100644 --- a/testdata/v0/invalid/intendedAudience_countries_invalid_country.yml +++ b/testdata/v0/invalid/intendedAudience_countries_invalid_country.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_countries_wrong_type.yml b/testdata/v0/invalid/intendedAudience_countries_wrong_type.yml index 012ec2e..bd469e7 100644 --- a/testdata/v0/invalid/intendedAudience_countries_wrong_type.yml +++ b/testdata/v0/invalid/intendedAudience_countries_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_scope_invalid_scope.yml b/testdata/v0/invalid/intendedAudience_scope_invalid_scope.yml index 94933cc..9bfa5f7 100644 --- a/testdata/v0/invalid/intendedAudience_scope_invalid_scope.yml +++ b/testdata/v0/invalid/intendedAudience_scope_invalid_scope.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_scope_wrong_type.yml b/testdata/v0/invalid/intendedAudience_scope_wrong_type.yml index e54f629..c2dc6e4 100644 --- a/testdata/v0/invalid/intendedAudience_scope_wrong_type.yml +++ b/testdata/v0/invalid/intendedAudience_scope_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_unsupportedCountries_invalid_country.yml b/testdata/v0/invalid/intendedAudience_unsupportedCountries_invalid_country.yml index 16d09f9..d8f1557 100644 --- a/testdata/v0/invalid/intendedAudience_unsupportedCountries_invalid_country.yml +++ b/testdata/v0/invalid/intendedAudience_unsupportedCountries_invalid_country.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_unsupportedCountries_wrong_type.yml b/testdata/v0/invalid/intendedAudience_unsupportedCountries_wrong_type.yml index 18794ab..2d1ea23 100644 --- a/testdata/v0/invalid/intendedAudience_unsupportedCountries_wrong_type.yml +++ b/testdata/v0/invalid/intendedAudience_unsupportedCountries_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/intendedAudience_wrong_type.yml b/testdata/v0/invalid/intendedAudience_wrong_type.yml index 78b81f9..978203a 100644 --- a/testdata/v0/invalid/intendedAudience_wrong_type.yml +++ b/testdata/v0/invalid/intendedAudience_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/invalid_yaml.yml b/testdata/v0/invalid/invalid_yaml.yml index b8816bd..76272df 100644 --- a/testdata/v0/invalid/invalid_yaml.yml +++ b/testdata/v0/invalid/invalid_yaml.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/isBasedOn_wrong_type.yml b/testdata/v0/invalid/isBasedOn_wrong_type.yml index 1622764..4df5249 100644 --- a/testdata/v0/invalid/isBasedOn_wrong_type.yml +++ b/testdata/v0/invalid/isBasedOn_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/it_riuso_codiceIPA_invalid.yml b/testdata/v0/invalid/it_riuso_codiceIPA_invalid.yml index ab76083..9f8724a 100644 --- a/testdata/v0/invalid/it_riuso_codiceIPA_invalid.yml +++ b/testdata/v0/invalid/it_riuso_codiceIPA_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/landingURL_invalid.yml b/testdata/v0/invalid/landingURL_invalid.yml index ae62a01..3c82b6e 100644 --- a/testdata/v0/invalid/landingURL_invalid.yml +++ b/testdata/v0/invalid/landingURL_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/invalid/landingURL_wrong_type.yml b/testdata/v0/invalid/landingURL_wrong_type.yml index b3e72ac..7edf984 100644 --- a/testdata/v0/invalid/landingURL_wrong_type.yml +++ b/testdata/v0/invalid/landingURL_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/invalid/legal_authorsFile_missing_file.yml b/testdata/v0/invalid/legal_authorsFile_missing_file.yml index f37dd05..f9f152e 100644 --- a/testdata/v0/invalid/legal_authorsFile_missing_file.yml +++ b/testdata/v0/invalid/legal_authorsFile_missing_file.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/legal_license_invalid.yml b/testdata/v0/invalid/legal_license_invalid.yml index d6896ba..296d2e2 100644 --- a/testdata/v0/invalid/legal_license_invalid.yml +++ b/testdata/v0/invalid/legal_license_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/legal_license_missing.yml b/testdata/v0/invalid/legal_license_missing.yml index 878500f..14f4bde 100644 --- a/testdata/v0/invalid/legal_license_missing.yml +++ b/testdata/v0/invalid/legal_license_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/legal_missing.yml b/testdata/v0/invalid/legal_missing.yml index b692ada..18b6326 100644 --- a/testdata/v0/invalid/legal_missing.yml +++ b/testdata/v0/invalid/legal_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/legal_wrong_type.yml b/testdata/v0/invalid/legal_wrong_type.yml index eb3a0a5..c15f434 100644 --- a/testdata/v0/invalid/legal_wrong_type.yml +++ b/testdata/v0/invalid/legal_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/localisation_availableLanguages_empty.yml b/testdata/v0/invalid/localisation_availableLanguages_empty.yml index 380daa9..9679841 100644 --- a/testdata/v0/invalid/localisation_availableLanguages_empty.yml +++ b/testdata/v0/invalid/localisation_availableLanguages_empty.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/localisation_availableLanguages_invalid.yml b/testdata/v0/invalid/localisation_availableLanguages_invalid.yml index 5a35ab2..ed5ce71 100644 --- a/testdata/v0/invalid/localisation_availableLanguages_invalid.yml +++ b/testdata/v0/invalid/localisation_availableLanguages_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/localisation_availableLanguages_invalid_bcp47.yml.disabled b/testdata/v0/invalid/localisation_availableLanguages_invalid_bcp47.yml.disabled index 546256f..d27291b 100644 --- a/testdata/v0/invalid/localisation_availableLanguages_invalid_bcp47.yml.disabled +++ b/testdata/v0/invalid/localisation_availableLanguages_invalid_bcp47.yml.disabled @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/localisation_availableLanguages_missing.yml b/testdata/v0/invalid/localisation_availableLanguages_missing.yml index 5d1e330..879fca1 100644 --- a/testdata/v0/invalid/localisation_availableLanguages_missing.yml +++ b/testdata/v0/invalid/localisation_availableLanguages_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/localisation_localisationReady_missing.yml b/testdata/v0/invalid/localisation_localisationReady_missing.yml index 607b44e..d55cad7 100644 --- a/testdata/v0/invalid/localisation_localisationReady_missing.yml +++ b/testdata/v0/invalid/localisation_localisationReady_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/logo_missing_file.yml b/testdata/v0/invalid/logo_missing_file.yml index 474e4fb..fb14be7 100644 --- a/testdata/v0/invalid/logo_missing_file.yml +++ b/testdata/v0/invalid/logo_missing_file.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/logo_unsupported_extension.yml b/testdata/v0/invalid/logo_unsupported_extension.yml index 06da7a6..3282de0 100644 --- a/testdata/v0/invalid/logo_unsupported_extension.yml +++ b/testdata/v0/invalid/logo_unsupported_extension.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/logo_wrong_type.yml b/testdata/v0/invalid/logo_wrong_type.yml index fdb0f9b..a2886a7 100644 --- a/testdata/v0/invalid/logo_wrong_type.yml +++ b/testdata/v0/invalid/logo_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contacts_email_invalid.yml b/testdata/v0/invalid/maintenance_contacts_email_invalid.yml index dd7bce1..b818bcc 100644 --- a/testdata/v0/invalid/maintenance_contacts_email_invalid.yml +++ b/testdata/v0/invalid/maintenance_contacts_email_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contacts_missing_with_type_community.yml b/testdata/v0/invalid/maintenance_contacts_missing_with_type_community.yml index 0e3993e..1189984 100644 --- a/testdata/v0/invalid/maintenance_contacts_missing_with_type_community.yml +++ b/testdata/v0/invalid/maintenance_contacts_missing_with_type_community.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contacts_missing_with_type_internal.yml b/testdata/v0/invalid/maintenance_contacts_missing_with_type_internal.yml index bc512e9..3acddad 100644 --- a/testdata/v0/invalid/maintenance_contacts_missing_with_type_internal.yml +++ b/testdata/v0/invalid/maintenance_contacts_missing_with_type_internal.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contacts_name_missing.yml b/testdata/v0/invalid/maintenance_contacts_name_missing.yml index e64d1bb..e906ad1 100644 --- a/testdata/v0/invalid/maintenance_contacts_name_missing.yml +++ b/testdata/v0/invalid/maintenance_contacts_name_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_email_invalid.yml b/testdata/v0/invalid/maintenance_contractors_email_invalid.yml index 9ea0da6..f85b93e 100644 --- a/testdata/v0/invalid/maintenance_contractors_email_invalid.yml +++ b/testdata/v0/invalid/maintenance_contractors_email_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_invalid_type.yml b/testdata/v0/invalid/maintenance_contractors_invalid_type.yml index 14140fb..ff78295 100644 --- a/testdata/v0/invalid/maintenance_contractors_invalid_type.yml +++ b/testdata/v0/invalid/maintenance_contractors_invalid_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_missing_with_type_contract.yml b/testdata/v0/invalid/maintenance_contractors_missing_with_type_contract.yml index 1802903..c657364 100644 --- a/testdata/v0/invalid/maintenance_contractors_missing_with_type_contract.yml +++ b/testdata/v0/invalid/maintenance_contractors_missing_with_type_contract.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_name_missing.yml b/testdata/v0/invalid/maintenance_contractors_name_missing.yml index f66dd91..eaae9cf 100644 --- a/testdata/v0/invalid/maintenance_contractors_name_missing.yml +++ b/testdata/v0/invalid/maintenance_contractors_name_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_until_invalid.yml b/testdata/v0/invalid/maintenance_contractors_until_invalid.yml index 979829c..b05b9f8 100644 --- a/testdata/v0/invalid/maintenance_contractors_until_invalid.yml +++ b/testdata/v0/invalid/maintenance_contractors_until_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_until_missing.yml b/testdata/v0/invalid/maintenance_contractors_until_missing.yml index a5e7910..4882fff 100644 --- a/testdata/v0/invalid/maintenance_contractors_until_missing.yml +++ b/testdata/v0/invalid/maintenance_contractors_until_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_contractors_website_invalid.yml b/testdata/v0/invalid/maintenance_contractors_website_invalid.yml index 3da8db8..339038e 100644 --- a/testdata/v0/invalid/maintenance_contractors_website_invalid.yml +++ b/testdata/v0/invalid/maintenance_contractors_website_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_type_invalid.yml b/testdata/v0/invalid/maintenance_type_invalid.yml index 04d80f9..2989ee0 100644 --- a/testdata/v0/invalid/maintenance_type_invalid.yml +++ b/testdata/v0/invalid/maintenance_type_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/maintenance_type_missing.yml b/testdata/v0/invalid/maintenance_type_missing.yml index 6100241..732ce6d 100644 --- a/testdata/v0/invalid/maintenance_type_missing.yml +++ b/testdata/v0/invalid/maintenance_type_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/monochromeLogo_missing_file.yml b/testdata/v0/invalid/monochromeLogo_missing_file.yml index 0d6733f..ad4c42b 100644 --- a/testdata/v0/invalid/monochromeLogo_missing_file.yml +++ b/testdata/v0/invalid/monochromeLogo_missing_file.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/monochromeLogo_unsupported_extension.yml b/testdata/v0/invalid/monochromeLogo_unsupported_extension.yml index 482e2fb..d9620a2 100644 --- a/testdata/v0/invalid/monochromeLogo_unsupported_extension.yml +++ b/testdata/v0/invalid/monochromeLogo_unsupported_extension.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/monochromeLogo_wrong_type.yml b/testdata/v0/invalid/monochromeLogo_wrong_type.yml index 13369d7..5ad0eb7 100644 --- a/testdata/v0/invalid/monochromeLogo_wrong_type.yml +++ b/testdata/v0/invalid/monochromeLogo_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/mostly_empty.yml b/testdata/v0/invalid/mostly_empty.yml index 790c9a6..32d644a 100644 --- a/testdata/v0/invalid/mostly_empty.yml +++ b/testdata/v0/invalid/mostly_empty.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: '0.3' +publiccodeYmlVersion: '0.4' description: en-US: {} localisation: {} diff --git a/testdata/v0/invalid/name_missing.yml b/testdata/v0/invalid/name_missing.yml index 2aa3543..cbb49d4 100644 --- a/testdata/v0/invalid/name_missing.yml +++ b/testdata/v0/invalid/name_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" # Should NOT validate: name is missing # name: Medusa diff --git a/testdata/v0/invalid/name_nil.yml b/testdata/v0/invalid/name_nil.yml index dda4b79..ecb7aff 100644 --- a/testdata/v0/invalid/name_nil.yml +++ b/testdata/v0/invalid/name_nil.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" # Should NOT validate: name is nil name: diff --git a/testdata/v0/invalid/name_wrong_type.yml b/testdata/v0/invalid/name_wrong_type.yml index dc14eda..7bafbba 100644 --- a/testdata/v0/invalid/name_wrong_type.yml +++ b/testdata/v0/invalid/name_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" # Should NOT validate: name must be a string name: [] diff --git a/testdata/v0/invalid/no-network/landingURL_invalid.yml b/testdata/v0/invalid/no-network/landingURL_invalid.yml index ae62a01..3c82b6e 100644 --- a/testdata/v0/invalid/no-network/landingURL_invalid.yml +++ b/testdata/v0/invalid/no-network/landingURL_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/invalid/no-network/logo_invalid_png.yml b/testdata/v0/invalid/no-network/logo_invalid_png.yml index 1ba5a68..89e0d19 100644 --- a/testdata/v0/invalid/no-network/logo_invalid_png.yml +++ b/testdata/v0/invalid/no-network/logo_invalid_png.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/no-network/logo_missing_file.yml b/testdata/v0/invalid/no-network/logo_missing_file.yml index 474e4fb..fb14be7 100644 --- a/testdata/v0/invalid/no-network/logo_missing_file.yml +++ b/testdata/v0/invalid/no-network/logo_missing_file.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/no-network/monochromeLogo_invalid_png.yml b/testdata/v0/invalid/no-network/monochromeLogo_invalid_png.yml index 6c16cfb..d12a427 100644 --- a/testdata/v0/invalid/no-network/monochromeLogo_invalid_png.yml +++ b/testdata/v0/invalid/no-network/monochromeLogo_invalid_png.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/outputTypes_invalid.yml b/testdata/v0/invalid/outputTypes_invalid.yml index 436836b..8a56734 100644 --- a/testdata/v0/invalid/outputTypes_invalid.yml +++ b/testdata/v0/invalid/outputTypes_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/outputTypes_wrong_type.yml b/testdata/v0/invalid/outputTypes_wrong_type.yml index b810d10..ee5603c 100644 --- a/testdata/v0/invalid/outputTypes_wrong_type.yml +++ b/testdata/v0/invalid/outputTypes_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/platforms_missing.yml b/testdata/v0/invalid/platforms_missing.yml index 2ef1c87..74edd2f 100644 --- a/testdata/v0/invalid/platforms_missing.yml +++ b/testdata/v0/invalid/platforms_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/platforms_wrong_type.yml b/testdata/v0/invalid/platforms_wrong_type.yml index f391007..a8f7121 100644 --- a/testdata/v0/invalid/platforms_wrong_type.yml +++ b/testdata/v0/invalid/platforms_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/publiccodeYmlVersion_missing.yml b/testdata/v0/invalid/publiccodeYmlVersion_missing.yml index cd5e947..3cb8ec0 100644 --- a/testdata/v0/invalid/publiccodeYmlVersion_missing.yml +++ b/testdata/v0/invalid/publiccodeYmlVersion_missing.yml @@ -1,5 +1,5 @@ # Should NOT validate: publiccodeYmlVersion is missing -# publiccodeYmlVersion: "0.3" +# publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/releaseDate_invalid.yml b/testdata/v0/invalid/releaseDate_invalid.yml index 7624e55..8cfb4de 100644 --- a/testdata/v0/invalid/releaseDate_invalid.yml +++ b/testdata/v0/invalid/releaseDate_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/releaseDate_missing.yml b/testdata/v0/invalid/releaseDate_missing.yml index 6bf3a44..2a59dbb 100644 --- a/testdata/v0/invalid/releaseDate_missing.yml +++ b/testdata/v0/invalid/releaseDate_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/releaseDate_wrong_type.yml b/testdata/v0/invalid/releaseDate_wrong_type.yml index b47b36c..dbf98f3 100644 --- a/testdata/v0/invalid/releaseDate_wrong_type.yml +++ b/testdata/v0/invalid/releaseDate_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/roadmap_invalid.yml b/testdata/v0/invalid/roadmap_invalid.yml index f9102d2..1019746 100644 --- a/testdata/v0/invalid/roadmap_invalid.yml +++ b/testdata/v0/invalid/roadmap_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" # Should NOT validate: roadmap must be an URL roadmap: 'foobar' diff --git a/testdata/v0/invalid/roadmap_wrong_type.yml b/testdata/v0/invalid/roadmap_wrong_type.yml index ab701cb..ca8aae3 100644 --- a/testdata/v0/invalid/roadmap_wrong_type.yml +++ b/testdata/v0/invalid/roadmap_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" # Should NOT validate: roadmap must be a string roadmap: [] diff --git a/testdata/v0/invalid/softwareType_invalid.yml b/testdata/v0/invalid/softwareType_invalid.yml index 48b73d8..d485e08 100644 --- a/testdata/v0/invalid/softwareType_invalid.yml +++ b/testdata/v0/invalid/softwareType_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/softwareType_missing.yml b/testdata/v0/invalid/softwareType_missing.yml index c46eddd..4199a1d 100644 --- a/testdata/v0/invalid/softwareType_missing.yml +++ b/testdata/v0/invalid/softwareType_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/softwareType_wrong_type.yml b/testdata/v0/invalid/softwareType_wrong_type.yml index ac30078..9f4fea8 100644 --- a/testdata/v0/invalid/softwareType_wrong_type.yml +++ b/testdata/v0/invalid/softwareType_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/softwareVersion_wrong_type.yml b/testdata/v0/invalid/softwareVersion_wrong_type.yml index 981f67a..ad40bb7 100644 --- a/testdata/v0/invalid/softwareVersion_wrong_type.yml +++ b/testdata/v0/invalid/softwareVersion_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/invalid/url_invalid.yml b/testdata/v0/invalid/url_invalid.yml index 3e936a2..4ddd729 100644 --- a/testdata/v0/invalid/url_invalid.yml +++ b/testdata/v0/invalid/url_invalid.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/url_missing.yml b/testdata/v0/invalid/url_missing.yml index 21ef6e1..0e78b81 100644 --- a/testdata/v0/invalid/url_missing.yml +++ b/testdata/v0/invalid/url_missing.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/url_wrong_type.yml b/testdata/v0/invalid/url_wrong_type.yml index 2191fef..e094f16 100644 --- a/testdata/v0/invalid/url_wrong_type.yml +++ b/testdata/v0/invalid/url_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa diff --git a/testdata/v0/invalid/usedBy_wrong_type.yml b/testdata/v0/invalid/usedBy_wrong_type.yml index 5c09979..194f0a2 100644 --- a/testdata/v0/invalid/usedBy_wrong_type.yml +++ b/testdata/v0/invalid/usedBy_wrong_type.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/valid/dependsOn.yml b/testdata/v0/valid/dependsOn.yml index c932232..6553abc 100644 --- a/testdata/v0/valid/dependsOn.yml +++ b/testdata/v0/valid/dependsOn.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/valid/maintenance_contacts_phone.yml b/testdata/v0/valid/maintenance_contacts_phone.yml index 548ba00..4674f8e 100644 --- a/testdata/v0/valid/maintenance_contacts_phone.yml +++ b/testdata/v0/valid/maintenance_contacts_phone.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/valid/no-network/dependsOn.yml b/testdata/v0/valid/no-network/dependsOn.yml index 35da3af..a26c8bc 100644 --- a/testdata/v0/valid/no-network/dependsOn.yml +++ b/testdata/v0/valid/no-network/dependsOn.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/valid/no-network/valid.yml b/testdata/v0/valid/no-network/valid.yml index daca608..b5bd9b1 100644 --- a/testdata/v0/valid/no-network/valid.yml +++ b/testdata/v0/valid/no-network/valid.yml @@ -1,7 +1,7 @@ # This is a valid publiccode.yml that uses as many fields and combinations # as possible. -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/valid/valid.minimal.yml b/testdata/v0/valid/valid.minimal.yml index 36b734d..5dc2de1 100644 --- a/testdata/v0/valid/valid.minimal.yml +++ b/testdata/v0/valid/valid.minimal.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/valid/valid.yml b/testdata/v0/valid/valid.yml index 2aaff2b..12e7d7e 100644 --- a/testdata/v0/valid/valid.yml +++ b/testdata/v0/valid/valid.yml @@ -1,7 +1,7 @@ # This is a valid publiccode.yml that uses as many fields and combinations # as possible. -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa applicationSuite: MegaProductivitySuite diff --git a/testdata/v0/valid_with_warnings/unicode_grapheme_clusters.yml b/testdata/v0/valid_with_warnings/unicode_grapheme_clusters.yml index aedfe7b..302bce8 100644 --- a/testdata/v0/valid_with_warnings/unicode_grapheme_clusters.yml +++ b/testdata/v0/valid_with_warnings/unicode_grapheme_clusters.yml @@ -1,4 +1,4 @@ -publiccodeYmlVersion: "0.3" +publiccodeYmlVersion: "0.4" name: Medusa url: "https://github.com/italia/developers.italia.it.git" diff --git a/testdata/v0/valid_with_warnings/valid.minimal.v0.3.yml b/testdata/v0/valid_with_warnings/valid.minimal.v0.3.yml new file mode 100644 index 0000000..c0a8ff6 --- /dev/null +++ b/testdata/v0/valid_with_warnings/valid.minimal.v0.3.yml @@ -0,0 +1,51 @@ +publiccodeYmlVersion: "0.3" + +name: Medusa +url: "https://github.com/italia/developers.italia.it.git" +releaseDate: "2017-04-15" + +platforms: + - web + +categories: + - cloud-management + +developmentStatus: development + +softwareType: "standalone/other" + +description: + eng: + localisedName: Medusa + shortDescription: > + A rather short description which + is probably useless + longDescription: > + Very long description of this software, also split + on multiple rows. You should note what the software + is and why one should need it. This is 158 characters. + Very long description of this software, also split + on multiple rows. You should note what the software + is and why one should need it. This is 316 characters. + Very long description of this software, also split + on multiple rows. You should note what the software + is and why one should need it. This is 474 characters. + Very long description of this software, also split + on multiple rows. You should note what the software + is and why one should need it. This is 632 characters. + features: + - Just one feature + +legal: + license: AGPL-3.0-or-later + +maintenance: + type: "community" + + contacts: + - name: Francesco Rossi + +localisation: + localisationReady: true + availableLanguages: + - eng diff --git a/v0.go b/v0.go index a55146c..168242a 100644 --- a/v0.go +++ b/v0.go @@ -8,7 +8,7 @@ import ( // PublicCodeV0 defines how a publiccode.yml v0.x is structured type PublicCodeV0 struct { - PubliccodeYamlVersion string `yaml:"publiccodeYmlVersion" validate:"required,oneof=0.2 0.2.0 0.2.1 0.2.2 0.3 0.3.0"` + PubliccodeYamlVersion string `yaml:"publiccodeYmlVersion" validate:"required,oneof=0.2 0.2.0 0.2.1 0.2.2 0.3 0.3.0 0.4 0.4.0"` Name string `yaml:"name" validate:"required"` ApplicationSuite string `yaml:"applicationSuite,omitempty"`