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

referance path of external file JSON in side schemas JSON file pasring problem #124

Open
patelgunjan007 opened this issue Mar 4, 2017 · 1 comment

Comments

@patelgunjan007
Copy link

patelgunjan007 commented Mar 4, 2017

RAML FILE:

schemas:
#%RAML 0.8
title: Temperature
version: v1.1.0-20160519
baseUri: http://localhost:80/
schemas:

  • json: !include temperature.json

temperature.json FILE:

{
"id" : "......."
"title" : "........"
"$ref": "core.json#"
}


error:

[{'json': {u'$schema': u'http://json-schema.org/draft-03/schema', u'type': u'object', u'properties': {u'album_type': {u'type': u'string', u'description': u"The type of the album: one of 'album', 'single', or 'compilation'."}, u'artists': {u'items': [Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 91, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/jsonref.py", line 212, in repr
return repr(self.subject)
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 131, in getattribute
return _oga(self, attr)
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 91, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 209, in subject
self.cache = super(LazyProxy, self).subject
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 91, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 195, in subject
return self.callback()
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 91, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/jsonref.py", line 165, in callback
self._error("%s: %s" % (e.class.name, unicode(e)), cause=e)
File "/usr/local/lib/python2.7/dist-packages/proxytypes.py", line 91, in wrapper
return method(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/jsonref.py", line 207, in _error
cause=cause
jsonref.JsonRefError

@sequentiality
Copy link

Same thing with ref:

"stats": { "type":"array", "items":{ "$ref":"Stats" }, "minItems":0, "uniqueItems":true }

{'App': {u'additionalProperties': False, u'$schema': u'http://json-schema.org/draft-03/schema', u'type': u'object', u'properties': {u'stats': {u'minItems': 0, u'items': Traceback (most recent call last):
  File "/Users/dmoz/repos/cf-utils-api/cf-utils-api.py", line 24, in <module>
    print schemas[0]
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 91, in wrapper
    return method(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/jsonref.py", line 212, in __repr__
    return repr(self.__subject__)
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 131, in __getattribute__
    return _oga(self, attr)
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 91, in wrapper
    return method(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 209, in __subject__
    self.cache = super(LazyProxy, self).__subject__
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 91, in wrapper
    return method(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 195, in __subject__
    return self.callback()
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 91, in wrapper
    return method(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/jsonref.py", line 165, in callback
    self._error("%s: %s" % (e.__class__.__name__, unicode(e)), cause=e)
  File "/Library/Python/2.7/site-packages/proxytypes.py", line 91, in wrapper
    return method(self, *args, **kwargs)
  File "/Library/Python/2.7/site-packages/jsonref.py", line 207, in _error
    cause=cause
jsonref.JsonRefError

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

No branches or pull requests

2 participants