-
Notifications
You must be signed in to change notification settings - Fork 66
RAML 1.0 support #116
RAML 1.0 support #116
Conversation
Signed-off-by: Lucas Fernandes de Oliveira <lfo14@inf.ufpr.br>
…of osprey-method-handler
…etting to loadRAML() in osprey.loadFile to validate RAML before loading
1 similar comment
|
||
var isExpandable = data.type && | ||
data.type.length === 1 && | ||
NON_EXPANDABLE_TYPES.indexOf(data.type[0]) === -1 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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", |
There was a problem hiding this comment.
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)
… osprey-mock-service
when will this be into master? |
Sorry, I can't give you a date but it should be merged soon. In the meantime you can |
I just tried your and still got nothing from server with raml 1.0 file (I used a example close to this : http://raml.org/) Any idea ? |
@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? |
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 ...) |
@jy95 what example did you use? Can you post the RAML in here, please? |
To make it clear , I used this example : https://github.com/mulesoft/osprey/blob/master/examples/express/index.js To test, I change "#%RAML 0.8" to "#%RAML 1.0" . When I started the server , I made the request and got 404 error (not the expected json). |
Thanks! We'll look into that. |
@jy95: that's odd, it works fine for me.
then in a separate terminal window:
|
maybe due to my Windows environnement ? The npm install of this module sends me a lot of warning XD |
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 |
…ls-with-path allow proxied URLs to have a path
raml-1-parser
parserRAMLVersion
to HTTP request handlerdatatype-expansion
misc: