GithubHelp home page GithubHelp logo

Comments (3)

borzilleri avatar borzilleri commented on June 10, 2024

I'm encountering the same issue. I poked around to see how this worked, and I'm not sure it'd be very easy, or even possible, for abao to handle this.

Part of the issue is that raml-parser does not parse $refs, see this issue: raml-org/raml-js-parser#115 The other part is that while the schema validator abao uses can handle $refs, but it requires the referenced schema to be already loaded, which may not be possible for abao to do dynamically.

One possible workaround might be an option to pass in schema files to be pre-loaded. (a --schemas path/to/schemas/*.json option, or similar).

(Aside: as a workaround, you can copy the schema from model.json in place of { "$ref":"model" }. it's annoying, but it'll work.)

from abao.

snthibaud avatar snthibaud commented on June 10, 2024

Ok. Thanks for your answer! In the end I just passed complete JSON schema's
to Abao. I still encountered an issue of testing dynamic urls (with a
number in it). That cannot be resolved, can it?

Best regards,

Stéphane

On Thu, Aug 6, 2015 at 1:55 AM, Jonathan Borzilleri <
[email protected]> wrote:

I'm encountering the same issue. I poked around to see how this worked,
and I'm not sure it'd be very easy, or even possible, for abao to handle
this.

Part of the issue is that raml-parser does not parse $refs, see this
issue: raml-org/raml-js-parser#115
raml-org/raml-js-parser#115 The other part is
that while the schema validator abao uses can handle $refs, but it requires
the referenced schema to be already loaded, which may not be possible for
abao to do dynamically.

One possible workaround might be an option to pass in schema files to
be pre-loaded. (a --schemas path/to/schemas/*.json option, or similar).


Reply to this email directly or view it on GitHub
#47 (comment).

from abao.

pieterA avatar pieterA commented on June 10, 2024

We also needed to be able to use JSON references in our specification for a project.

I actually got it working like duaiwe discribed it. If i deliver a pull request with this functionality (preload schemas from a given path) is there any chance that this pull request will be accepted?

Best regards,
Pieter

from abao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.