Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Tronje Krop
    @tkrop
    @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
    Rob Oxspring
    @roxspring
    "RawGit has reached the end of its useful life"
    "If you're currently using RawGit, please stop using it as soon as you can."
    "GitHub repositories that served content through RawGit within the last month will continue to be served until at least October of 2019"
    I'm a bit puzzled that the schema is different.
    so for now lets go with the current.
    Vadim Shaigorodskiy
    @vadeg
    We have all schemas locally, no?
    Tronje Krop
    @tkrop
    yes
    Rob Oxspring
    @roxspring
    seems a bit crazy that we're bundling local copies of hte relevant schemas, and falling back to using them - but our default configuration is to pull fresh copies down from the internet
    I wonder how much we've benefited from being able to softcode those references?
    Tronje Krop
    @tkrop
    have pushed the other redirect to zalando/zally#1120
    local test was as expected successful.
    Rob Oxspring
    @roxspring
    :thumbsup:
    Tronje Krop
    @tkrop
    @roxspring thanks for proposing this fix.
    @vadeg can you approve?
    Rob Oxspring
    @roxspring
    np - was very concerned that i'd caused it with my recent refactoring so was extra motivated to understand - the fix/hack was a bonus
    Vadim Shaigorodskiy
    @vadeg
    @tkrop sure
    done
    Tronje Krop
    @tkrop
    thanks. i role out as quick as possible.
    loretop
    @loretop
    Hello everyone, I have a question regarding adding my own rule. I'm a little lost because I'm not really sure where I should be creating my own rules, and how to know if they are being implemented correctly.
    Should I just add them in a package on zally/server or is it different from the way zalando/zally rulset are implemented? Also do I have to create a rulset if I want to add a single rule?
    I'm sorry for all the questions but I can't find much info about it (besides the documentation) or even another project that uses zally (if anyone has an example it would be super useful). I'm checking different ways to validate an api and zally caught my attention. Any help is appreciated, thank you!
    Rob Oxspring
    @roxspring
    Hi. Work to make developing custom rules easier is coming along but still not there yet, so the viable options for now are (1) contribute your new rule to Zally itself or (2) forking the repo and adding private rules to your own fork.
    All rules need to be in a ruleset, but you can likely add to ZallyRuleSet unless you really have a bunch of related rules that would make better sense as a set.
    Rob Oxspring
    @roxspring
    Hopefully some of that helps. If you're able to keep notes of progress and discoveries along the way then I suspect they could be an invaluable starting point for some sort of user/developer guide!
    loretop
    @loretop
    Thank you! I'm keeping some notes, if they prove to be useful I'll send them
    loretop
    @loretop
    Hi again, I have a question regarding creating my own set of rules. I tried to create a RuleSet in a similar way to ZallyRuleSet but it doesn's seem to be working because when I try to add a Rule to it (ruleSet = MyRuleSet::class) it doesn't work. Is there another thing I should be doing besides creating the MyRuleSet class and setting it?
    Rob Oxspring
    @roxspring
    MyRuleSet needs to implement the RuleSet interface, and likely can extend AbstractRuleSet
    I started on an example external ruleset in a separate project last night - it's still work in progress but I'll push it somewhere tonight and share it
    loretop
    @loretop
    Thank you so much! That would be very helpful
    Rob Oxspring
    @roxspring
    So, good news here's my example as promised: https://github.com/roxspring/zally-ruleset-example
    Bad news: It doesn't quite work as I haven't yet figured out a good way to get the rules onto the Zally server's class path.
    Rob Oxspring
    @roxspring
    Actually, forget that bad news. I've updated the example to patch the new rules into zally.jar and it seems to work.
    Once we have official published jars and docker images then I suspect this can serve as the basis for some official docs.
    loretop
    @loretop
    Thanks!
    Vadim Shaigorodskiy
    @vadeg
    Hi all,
    I wonder what is it purpose having zally-rule-api and zally-core separate? Do we have plans to support other rule implementation?