Code Monkey home page Code Monkey logo

Comments (9)

jstoiko avatar jstoiko commented on May 24, 2024

What happens when you try validating your RAML file: ramlfications validate /path/to/file.raml?

from ramses.

adam-codeberg avatar adam-codeberg commented on May 24, 2024

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.

jstoiko avatar jstoiko commented on May 24, 2024

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.

adam-codeberg avatar adam-codeberg commented on May 24, 2024

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.

jstoiko avatar jstoiko commented on May 24, 2024
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.

jstoiko avatar jstoiko commented on May 24, 2024

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.

adam-codeberg avatar adam-codeberg commented on May 24, 2024

Oh right, got it, thanks for that!
Will implement those changes and report back.

from ramses.

adam-codeberg avatar adam-codeberg commented on May 24, 2024

Yeah the errors were due to invalid RAML v8.
Wsgi server now loads. Cheers!

from ramses.

jstoiko avatar jstoiko commented on May 24, 2024

Thanks the update!

from ramses.

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.