ga4gh-beacon / specification

GA4GH Beacon specification.
Apache License 2.0
32 stars 25 forks source link

Use --quiet flag to reduce maven output (issue #265) #266

Closed sdelatorrep closed 5 years ago

sdelatorrep commented 5 years ago

The paths have changed from /api/validate and /api/debug to /validator and /validator/debug image

sdelatorrep commented 5 years ago

OK. Still failing because /validator/debug returns some warnings (not errors) and it seems that the previous version returned nothing for the same yaml file:

{
  "schemaValidationMessages": [
    {
      "level": "warning",
      "domain": "validation",
      "keyword": "format",
      "message": "format attribute \"uri-reference\" not supported",
      "schema": {
        "loadingURI": "#",
        "pointer": "\/definitions\/ExternalDocumentation\/properties\/url"
      }
    },
    {
      "level": "warning",
      "domain": "validation",
      "keyword": "format",
      "message": "format attribute \"uri-reference\" not supported",
      "schema": {
        "loadingURI": "#",
        "pointer": "\/definitions\/License\/properties\/url"
      }
    }
  ]
}

The test fails because it checks that the response of the call to /validator/debug is empty.

sdelatorrep commented 5 years ago

BTW, I don't understand why it's returning these 2 warnings as we are following the spec (e.g. https://swagger.io/specification/#licenseObject).

teemukataja commented 5 years ago

I tried to fix this as well, by changing branch 2.0 to tag v2.0.0 and using the url /validator?url= as mentioned in swagger-validator v2.0.0, but the same issues repeat.

Here is the full validation error. There are a lot of missing types and unexpected attributes.

This problem started with the refactoring of swagger-validator 2.0 9 days ago, since the last successful Beacon build is from 14 days ago. The swagger editor doesn't report any problems, so this might be a bug in the validator, as the two of the errors state "attribute openapi is unexpected" and "attribute swagger is missing", but on the github page of swagger-validator it is stated that openapi is supported as well.

TL;DR: I suspect that beacon.yaml is intact, and swagger-validator is broken (as of the refactoring on Jan 23rd).

mcupak commented 5 years ago

Great analysis guys! It looks like validator badge doesn't support validation of those 2 schemas.

@sdelatorrep @teemukataja See #268 as a possible workaround.

sdelatorrep commented 5 years ago

Closed in favour of #268