Comments (9)
What happens when you try validating your RAML file: ramlfications validate /path/to/file.raml
?
from ramses.
ramlfications validate /path/to/file.raml returns
ValueError: Expecting property name: line 29 column 13 (char 783)
Line 29 is this section (marked by * )
- item_owner_acl:
description: ACL that allows everyone to read, authenticated to create and item owners to edit item
type: x-ACL
settings:
collection: |
*allow g:admin all
allow everyone view,options
allow authenticated create
item: |
allow g:admin all
allow authenticated view,options
Running the same validation check on the latest ramses-example from git returns
Error validating file example.raml:
InvalidSecuritySchemeError: 'settings' for security scheme 'x_token_auth' require definition.
pip list
attrs (15.1.0)
blinker (1.4)
click (6.2)
cryptacular (1.4.1)
elasticsearch (2.1.0)
inflection (0.3.1)
jsonref (0.1)
markdown2 (2.3.0)
mongoengine (0.9.0)
nefertari (0.6.1)
nefertari-sqla (0.4.1)
PasteDeploy (1.5.2)
pbkdf2 (1.3)
pip (7.1.2)
psycopg2 (2.6.1)
pymongo (2.8)
pyramid (1.6b2)
pyramid-sqlalchemy (1.4)
pyramid-tm (0.12.1)
python-dateutil (2.4.2)
PyYAML (3.11)
ramlfications (0.1.8)
ramses (0.5.1)
repoze.lru (0.6)
requests (2.8.1)
setuptools (18.2)
simplejson (3.8.1)
six (1.10.0)
SQLAlchemy (1.0.9)
SQLAlchemy-Utils (0.31.3)
Tempita (0.5.2)
termcolor (1.1.0)
transaction (1.4.4)
translationstring (1.3)
urllib3 (1.12)
venusian (1.0)
WebOb (1.5.1)
wheel (0.24.0)
xmltodict (0.9.2)
zope.deprecation (4.1.2)
zope.dottedname (4.1.0)
zope.interface (4.1.3)
zope.sqlalchemy (0.7.6)
I've managed to bypass the "Expecting property name" error by modifying parts of my RAML file, however the error
InvalidSecuritySchemeError: 'settings' for security scheme 'x_token_auth' require definition.
Has no known workaround.
I'm not up to speed with RAML specs and largely dependant on the conventions I saw in the ramses-examples etc, any ideas?
Reference for myself & others: https://github.com/raml-org/raml-spec/blob/master/raml-0.8.md
from ramses.
I copy/pasted the raml file above and aside from 2 unrelated errors that were straight-forward to fix, ramlfications validate file.raml
returned "Success! Valid RAML file: file.raml". The only thing that I can think of is that there may be tabs on or around line 29 in your file and when you copy/pasted it, it converted those tabs into spaces which explains why it works for me...
from ramses.
Yeah the copy/paste messed up some spacing.
I also removed some duplicate collections hoping that was it, but didn't have any luck.
I get the same InvalidSecuritySchemeError error with the raml from ramses-example.
Can you paste your pip list? I would like to compare and try validating the file with your python library stack.
from ramses.
attrs (15.1.0)
blinker (1.4)
click (6.2)
cryptacular (1.4.1)
elasticsearch (2.1.0)
inflection (0.3.1)
jsonref (0.1)
markdown2 (2.3.0)
mongoengine (0.9.0)
nefertari (0.6.1)
nefertari-mongodb (0.4.1)
nefertari-sqla (0.4.1)
Paste (2.0.2)
PasteDeploy (1.5.2)
pbkdf2 (1.3)
pip (7.1.2)
psycopg2 (2.6.1)
pymongo (2.8)
pyramid (1.5.7)
pyramid-sqlalchemy (1.4)
pyramid-tm (0.12.1)
python-dateutil (2.4.2)
PyYAML (3.11)
ramlfications (0.1.8)
ramses (0.5.1)
ramses-example (0.0.1)
repoze.lru (0.6)
requests (2.8.1)
setuptools (18.2)
simplejson (3.8.1)
six (1.10.0)
SQLAlchemy (1.0.9)
SQLAlchemy-Utils (0.31.3)
Tempita (0.5.2)
termcolor (1.1.0)
transaction (1.4.4)
translationstring (1.3)
urllib3 (1.12)
venusian (1.0)
waitress (0.8.9)
WebOb (1.5.1)
wheel (0.24.0)
xmltodict (0.9.2)
zope.deprecation (4.1.2)
zope.dottedname (4.1.0)
zope.interface (4.1.3)
zope.sqlalchemy (0.7.6)
from ramses.
Oh, I get that error too, quick fix is to add a (dummy) "settings" section:
...
- x_token_auth:
description: Authorization header token policy
type: x-ApiKey
settings:
foo: bar
...
from ramses.
Oh right, got it, thanks for that!
Will implement those changes and report back.
from ramses.
Yeah the errors were due to invalid RAML v8.
Wsgi server now loads. Cheers!
from ramses.
Thanks the update!
from ramses.
Related Issues (20)
- Filter JSON before output HOT 8
- ES 2.x support HOT 2
- Relationship to items of the same schema possible? HOT 2
- Field [_version] is defined twice in [Item] HOT 3
- Unavailable scaffolds: ramses_starter HOT 3
- Support for / How to use geography objects? HOT 2
- Does ramses support JSON data type? HOT 2
- Problems installing on mac osx HOT 1
- Confusion on virtualenv directory vs project location HOT 3
- Ondelete not nullifying fields in docs of index HOT 3
- response body cannot have a array HOT 2
- Confusing ACE definitions using registered callables
- Using Ramses without elasticsearch HOT 1
- pcreate is deprecated
- RAML declaration order and Model relationships HOT 4
- Nested endpoints fail to commit to Postgres HOT 25
- Nested endpoints at 4 levels behaving strangely with GET requests
- How about update your readme file. HOT 2
- Some fields in event.fields are strings instead of the schematized type in after_* event handlers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ramses.