italia/publiccode-parser-go

allow also relative path for authorsFile

Closed this issue · 2 comments

Using this json

{
  "url": "https://github.com/italia/publiccode-editor",
  "localisation": { 
    "localisationReady": false
  },
  "description": {
     "it": {
	"apiDocumentation": "README.md"
	},
  },
  "legal": {
	"authorsFile": "AUTHORS.md"
  },
  "publiccodeYmlVersion": "0.2"
}

I get

    {
      "key": "legal.authorsFile",
      "description": "file 'AUTHORS.md' does not exist",
      "line": 13,
      "column": 3
    }

As it is already happening for apiDocumentation field where relative path to url are allowed I expect same behaviour for authorsFile.

Should be fixed in the refactor branch.

@sebbalex we test this with https://github.com/italia/publiccode-parser-go/blob/master/testdata/v0.2/valid/valid.yml#L185 with the new version, so it is fixed.

apiDocumentation is supposed to be an URL.

Closing as fixed, but feel free to reopen it I'm missing something.