Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Rob Oxspring
    @roxspring
    debugging my failing UseOpenApiRuleTest I can see the underlying processing message before the null pointer
    message -> {TextNode@4171} ""content at URI \"http://openapis.org/v3/schema.json#\" is not valid JSON""
    https://www.openapis.org/v3/schema.json does indeed resolve to an html 404 page
    ( i should add that idea also tells me parsingMessage -> {TextNode@4175} ""Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')"" which is why an html page seems relevant)
    Tronje Krop
    @tkrop
    oh ja. I'm currently running the command from the .travis
    it shows the failures but does not fail :)
    Rob Oxspring
    @roxspring
    wtf?
    Tronje Krop
    @tkrop
    what a mess.
    oh, no wrong. it fails.
    lets see in the logs, what Friday happend.
    seems to have worked on Friday.
    Rob Oxspring
    @roxspring
    have we just been unlucky and openapis.org have moved that schema since Friday??
    Tronje Krop
    @tkrop
    that may be the reason.
    Rob Oxspring
    @roxspring
    Feel I have to point out that I did bump json-schema-core to a pre-released version - which could be related to all this https://github.com/zalando/zally/blob/master/server/build.gradle.kts#L67
    Tronje Krop
    @tkrop
    it may even just be temporary down.
    Rob Oxspring
    @roxspring
    true
    Tronje Krop
    @tkrop
    however, it is in general no good idea to go down, if some page is not accessible during startup. we can observe this for old versions too. they deny to start at all.
    Rob Oxspring
    @roxspring
    hmmm - looks like that page has been 404'ing since 2017 (RepreZen/KaiZen-OpenAPI-Editor#339) - so we must be failing to find the local copy
    Tronje Krop
    @tkrop
    so the failure behavior has improved, but the fix was partial.
    Rob Oxspring
    @roxspring
    although I guess it's still possible that the url was 200'ing between 2017 and now
    e.g. earlier on Friday
    Tronje Krop
    @tkrop
    sounds like the right solution preload the resources.
    I agree.
    Rob Oxspring
    @roxspring
    I get the same failures against a checkout of 1-2 month old commits.
    Suggests this whole time we thought we were using the public copy while thinking we were using our own??
    (and suggests it's not a screwup introduced by my recent refactoring!)
    Tronje Krop
    @tkrop
    yes, nothing your recent change is responsible for I would say.
    but if you have an idea where to implement the preload correctly ...
    Tronje Krop
    @tkrop
    damned is also down.
    however lets try to access the raw resource directly.
    It is different from the currently downloaded spec, so I try to replace the link only first.
    @zeitlinger @vadeg can you approve.
    Tronje Krop
    @tkrop
    sorry still fails. :(
    Rob Oxspring
    @roxspring
    Looks like we correctly load the local schema as a JsonNode and then pass that to our JsonSchemaValidator with redirects setup for just http://json-schema.org/draft-04. I think, when validating the local schema internal references are being found and translated into absolute references, but nothing in the underlying validation understands that this is the the local schema that the process is starting from, and loads over http instead. Consequently adding an extra redirect for the originally loaded schema seems to hack around the problem - although I still suspect it means we're unnecessarily loading the original schema multiple times.
    Tronje Krop
    @tkrop
    Yes, unless a cache in the parser is active to prevent this.
    damned, this schema is also missing.
    Rob Oxspring
    @roxspring
    Take a look at zalando/zally#1120 - I think this might be a reasonable bandaid
    Tronje Krop
    @tkrop
    not that bad. may be we should do this for openapi-2-schema too. And how about http://json-schema.org/draft-04?
    Rob Oxspring
    @roxspring
    draft-04 is already being redirected for openapi-3
    Tronje Krop
    @tkrop
    true. should have looked closer.
    Rob Oxspring
    @roxspring
    but we're only in this branch of code because we've failed to load from the specified location
    Tronje Krop
    @tkrop
    yes. However, I think it should be best practice to redirect every resource load, that we want to pin to a certain default resource should be mapped by default.
    Rob Oxspring
    @roxspring
    totally agreed.
    Tronje Krop
    @tkrop
    I'm currently testing with both.
    Rob Oxspring
    @roxspring
    ok - so we've soft-coded the openapi schema urls
    Tronje Krop
    @tkrop
    one could say