Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support v3 #66

Closed
robjens opened this issue Aug 21, 2015 · 2 comments
Closed

How to support v3 #66

robjens opened this issue Aug 21, 2015 · 2 comments

Comments

@robjens
Copy link

robjens commented Aug 21, 2015

Ok it's not 'really' v3 support but good enough for my use case and works like a charm.

So just a minor tip here, in case anyone would want to use JSON Schema v3 (I want to mock up our RAML API schemas and those are only v3 as of yet).

There is an easy way to do this, the steps to take would be:

  1. npm i json-schema-compatibility
  2. read schema file(s) using any (a)sync method you like
  3. parse each file buffer -> string and apply JSON.parse to the result
  4. use the compat.v4 method and apply it on 3
  5. delete the '$schema' key from the variable holding 4

The json-schema-faker dependency normalizr (I recall) stops complaining.

@ducin
Copy link
Contributor

ducin commented Jan 7, 2016

Hi @robjens! Sorry to reply so late. This post is not really an issue, it seems to be an instruction on what to do in order to achieve v3 support. I would like to include your work into the project.

First I was thinking of implementing it, but it's using some 3rd party tools and the problem seems to be an edge case. So I think we could just include it into the documentation (README.md file). But in order to do that, I'd ask you to provide some more information about that, i.e.

  • what do you need the json-schema-compatibility for?
  • some code snippets?
  • a working gist or anything we could see this in action?

And how about the RAML API schemas - do they still support v3 only?

@pateketrueke
Copy link
Member

This won't be fixed on JSF, of course we need to add documentation about this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants