Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

RAML 1.0 support #116

Merged
merged 35 commits into from
Mar 1, 2017
Merged

RAML 1.0 support #116

merged 35 commits into from
Mar 1, 2017

Conversation

jstoiko
Copy link
Contributor

@jstoiko jstoiko commented Oct 6, 2016

  • use raml-1-parser parser
  • pass RAMLVersion to HTTP request handler
  • RAML 1.0 libs
  • RAML 1.0 type expansion using datatype-expansion
  • RAML 1.0 tests
    • any
    • object
    • array
    • scallar
    • JSON-schema
    • inline
    • type expansion
    • libs
  • upgrade devDependencies

misc:

@jstoiko jstoiko added this to the v0.4.0 milestone Oct 6, 2016
@coveralls
Copy link

coveralls commented Oct 6, 2016

Coverage Status

Coverage increased (+0.04%) to 93.646% when pulling a32fe19 on raml1.0 into 1272f87 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 93.646% when pulling a32fe19 on raml1.0 into 1272f87 on master.

@coveralls
Copy link

coveralls commented Oct 6, 2016

Coverage Status

Coverage increased (+0.04%) to 93.646% when pulling c264c2a on raml1.0 into 1272f87 on master.

@coveralls
Copy link

coveralls commented Oct 10, 2016

Coverage Status

Coverage increased (+0.6%) to 94.207% when pulling 0931af5 on raml1.0 into 1272f87 on master.

@coveralls
Copy link

coveralls commented Oct 11, 2016

Coverage Status

Coverage increased (+0.6%) to 94.207% when pulling 8afd705 on raml1.0 into 1272f87 on master.


var isExpandable = data.type &&
data.type.length === 1 &&
NON_EXPANDABLE_TYPES.indexOf(data.type[0]) === -1
Copy link
Contributor

@postatum postatum Oct 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think non-expandable types (atomic) check is already performed in datatype-expansion expanded_form.cljc#L177

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like an issue in datatype-expansion

Copy link

@llattes llattes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general.

"debug": "^2.2.0",
"finalhandler": "^0.4.0",
"form-data": "^1.0.0-rc3",
"http-errors": "^1.3.1",
"invariant": "^2.1.0",
"oauth2orize": "^1.0.1",
"osprey-method-handler": "^0.10.0",
"osprey-method-handler": "jstoiko/osprey-method-handler#raml1.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the new version is released, remind to change this reference to the corresponding version (0.10.4 I guess from https://github.com/mulesoft-labs/osprey-method-handler/pull/18/files)

@coveralls
Copy link

coveralls commented Nov 23, 2016

Coverage Status

Coverage increased (+3.6%) to 97.229% when pulling 4256dc3 on raml1.0 into 1272f87 on master.

@coveralls
Copy link

coveralls commented Jan 4, 2017

Coverage Status

Coverage increased (+3.6%) to 97.229% when pulling 1f3ae12 on raml1.0 into 1272f87 on master.

@thenanox
Copy link

when will this be into master?

@jstoiko
Copy link
Contributor Author

jstoiko commented Jan 30, 2017

Sorry, I can't give you a date but it should be merged soon. In the meantime you can npm install git+https://github.com/mulesoft/osprey.git#raml1.0.

@jy95
Copy link

jy95 commented Feb 14, 2017

I just tried your
``
npm install git+https://github.com/mulesoft/osprey.git#raml1.0

and still got nothing from server with raml 1.0 file (I used a example close to this : http://raml.org/)

Any idea ?

@jstoiko
Copy link
Contributor Author

jstoiko commented Feb 14, 2017

@jy95: what do you mean by "I got nothing from server"? did you use the command line? can you provide a sample of both your RAML and code/command?

@jy95
Copy link

jy95 commented Feb 14, 2017

I just tried osprey-server with the example ram file on http://raml.org/ (and one server from the github examples directory). Result : when I print the router variable inside server, I don't get their paths (each time 404 error , but with raml 0.8 file , no problem ...)

@sichvoge
Copy link
Contributor

@jy95 what example did you use? Can you post the RAML in here, please?

@jy95
Copy link

jy95 commented Feb 14, 2017

To make it clear , I used this example : https://github.com/mulesoft/osprey/blob/master/examples/express/index.js
with its raml file : https://github.com/mulesoft/osprey/blob/master/examples/express/api.raml .

To test, I change "#%RAML 0.8" to "#%RAML 1.0" .
I checked with a validator and the file was right.

When I started the server , I made the request and got 404 error (not the expected json).
When I revert the change in raml file to 0.8 , it works.

@sichvoge
Copy link
Contributor

Thanks! We'll look into that.

@jstoiko
Copy link
Contributor Author

jstoiko commented Feb 15, 2017

@jy95: that's odd, it works fine for me.

$ git clone git@github.com:mulesoft/osprey.git -b raml1.0 osprey-raml1.0
$ cd osprey-raml1.0
$ npm install
$ node examples/express/index.js
Application listening on 3000...

then in a separate terminal window:

$ http localhost:3000/v1/users?sort=username
HTTP/1.1 200 OK
(...)

[
    {
        "password": "hunter2",
        "username": "blakeembrey"
    }
]

@jy95
Copy link

jy95 commented Feb 15, 2017

maybe due to my Windows environnement ? The npm install of this module sends me a lot of warning XD
Thanks for checking

@jy95
Copy link

jy95 commented Feb 22, 2017

I think I found the reason:

https://github.com/mulesoft/osprey/blob/raml1.0/package.json#L66

Their develop fix a lot of issues : https://github.com/raml-org/raml-js-parser-2/tree/develop , just like this : raml-org/raml-js-parser-2#657

Time to change the version XD

@coveralls
Copy link

coveralls commented Feb 23, 2017

Coverage Status

Coverage increased (+3.6%) to 97.236% when pulling 0f1958c on raml1.0 into 1272f87 on master.

@coveralls
Copy link

coveralls commented Feb 23, 2017

Coverage Status

Coverage increased (+3.6%) to 97.236% when pulling d257208 on raml1.0 into 1272f87 on master.

@coveralls
Copy link

coveralls commented Feb 28, 2017

Coverage Status

Coverage increased (+3.6%) to 97.236% when pulling de91ad5 on raml1.0 into 1272f87 on master.

@jstoiko jstoiko merged commit a0eb9a7 into master Mar 1, 2017
@jstoiko jstoiko deleted the raml1.0 branch March 1, 2017 01:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants