api-designer icon indicating copy to clipboard operation
api-designer copied to clipboard

implement osprey as local mock service

Open xiaohanyu opened this issue 11 years ago • 19 comments

Hi,

I'm using api-designer in my company with RAML and it works great. However, I have a question, how can it build a localhost mock service inside my company for RAML instead of using mock service from mulesoft?

I mean, is there some open source software that eats RAML and produces a mock service in localhost?

I know mulesoft's studio IDE, however, it has bugs with RAML's !include syntax.

Thanks!

xiaohanyu avatar Dec 05 '14 06:12 xiaohanyu

Hi @xiaohanyu - the mocking service is not available on-premise, unfortunately. What you can do is using Anypoint Studio -> create a new project -> select APIkit and the RAML you would like to have a mocking of -> Finish. The APIkit automatically creates a flow application with flows for each http_verb:/resource and if you provide examples you get Set Payload components containing them by default. If you run the Mule app and do a request, you will get your examples back.

This should work fine as a workaround. You can even use it combined with Maven to automate this.

sichvoge avatar Dec 05 '14 13:12 sichvoge

Hi Xiao,

Could you please provide more details around the Studio bugs that you are referring to?

Thanks,

Reza

On Thu, Dec 4, 2014 at 10:54 PM, Xiao Hanyu [email protected] wrote:

Hi,

I'm using api-designer in my company with RAML and it works great. However, I have a question, how can it build a localhost mock service inside my company for RAML instead of using mock service from mulesoft?

I mean, is there some open source software that eats RAML and produces a mock service in localhost?

I know mulesoft's studio IDE, however, it has bugs with RAML's !include syntax.

Thanks!

— Reply to this email directly or view it on GitHub https://github.com/mulesoft/api-designer/issues/269.

Reza Shafii

Senior Director of Product Management - Anypoint Platform for APIs | MuleSoft http://www.mulesoft.com/

77 Geary Street, Suite 400 | San Francisco, CA 94108

Tel: +1 415-632-6525 [email protected] | twitter.com/rezaloo

rezaloo avatar Dec 08 '14 05:12 rezaloo

@sichvoge Thanks for your reply. I'm still wondering why not open source this type of mock service, I think it is much more better for the adoption of RAML spec if it has a open mock service running on localhost.

@rezaloo I'll paste some more info this day.

xiaohanyu avatar Dec 08 '14 06:12 xiaohanyu

Great, thanks.

Reza

On Sun, Dec 7, 2014 at 10:07 PM, Xiao Hanyu [email protected] wrote:

@sichvoge https://github.com/sichvoge Thanks for your reply. I'm still wondering why not open source this type of mock service, I think it is much more better for the adoption of RAML spec if it has a open mock service running on localhost.

@rezaloo https://github.com/rezaloo I'll paste some more info this day.

— Reply to this email directly or view it on GitHub https://github.com/mulesoft/api-designer/issues/269#issuecomment-65998760 .

Reza Shafii

Senior Director of Product Management - Anypoint Platform for APIs | MuleSoft http://www.mulesoft.com/

77 Geary Street, Suite 400 | San Francisco, CA 94108

Tel: +1 415-632-6525 [email protected] | twitter.com/rezaloo

rezaloo avatar Dec 08 '14 06:12 rezaloo

Hey, I've checked https://github.com/mulesoft/osprey , and it seems this is a mock service for localhost, any comments on this? Thanks!

xiaohanyu avatar Dec 09 '14 03:12 xiaohanyu

Hi @xiaohanyu, you are right, osprey does also provide mocking capabilities, which you can use.

dmartinezg avatar Dec 09 '14 12:12 dmartinezg

I have the two combined here: https://github.com/jewelsjacobs/raml-osprey-api-designer

jewelsjacobs avatar Feb 27 '15 16:02 jewelsjacobs

Cool stuff Julia!

On Fri, Feb 27, 2015 at 8:49 AM, Julia Jacobs [email protected] wrote:

I have the two combined here: https://github.com/jewelsjacobs/raml-osprey-api-designer

— Reply to this email directly or view it on GitHub https://github.com/mulesoft/api-designer/issues/269#issuecomment-76427150 .

usarid avatar Feb 27 '15 21:02 usarid

Brilliant!

sichvoge avatar Feb 28 '15 11:02 sichvoge

I will turning this to a enhancement request as it would be really nice to have osprey as the out of the box mocking service for the standalone designer.

sichvoge avatar Jun 18 '15 17:06 sichvoge

This has become very difficult for me to maintain with the updates to mongodb (3.0 and the native nodeJS driver), osprey and api-designer. Currently my project is broken. :confounded:

I could really use some help with this . . . :sob:

I've even had to investigate using API Blueprint as an alternative because my new gig wants a solution ASAP or they are going to ditch the idea of design first API development . . . :rage4:

HELP!!!!!

jewelsjacobs avatar Jun 24 '15 18:06 jewelsjacobs

@jewelsjacobs, what kind of help do you need? let's do what ever we can to keep you w/ RAML ;)

sichvoge avatar Jun 24 '15 20:06 sichvoge

The full sad tale . . .

Here's my app:

https://github.com/jewelsjacobs/raml-osprey-api-designer

It's a mashup of osprey for mock data, mongoDB as a datasource, raml2html for documentation and api-designer as the RAML editor.

I wanted to update it so I could use the new api designer features (create new folders and export files). Because I'm using mongodb as a datasource, that requires some trickery in the api-designer's index.html file to keep it decoupled from the api-designer's app code. You can see my sad attempt here: - https://github.com/jewelsjacobs/raml-osprey-api-designer/blob/update-api-designer/app/index.html

My back end broke when mongoDB upgraded to 3+ along with the native nodeJS driver update so I made a sad attempt to update my files here:

  • https://github.com/jewelsjacobs/raml-osprey-api-designer/compare/mongodb-update#diff-7e04f70880ebb99d09c6b399e4fa124c
  • https://github.com/jewelsjacobs/raml-osprey-api-designer/compare/mongodb-update#diff-8e8327f788a5f5fdc4b1cf13459b2755

The big disappointment was I had emailed the link of my raml-osprey-api-designer app repo to an Architect at Paypal who did a demo at an EnterpriseNodeJS meetup on swaggerize because he told me afterword he wanted to use RAML but couldn't find tools that worked well together and couldn't get buy in from his team. He forwarded my link to the API Director over there and the guy wanted me to do a demo of my app but it was too broken so I have not responded!

AAAAGGGGG!!!!!

TBH the Blueprint solution didn't work either because drakov, the mock data server, was not handling schema validations properly so now I'm demoing the Mulesoft Anypoint service to my co-workers next week. I've got to put a support ticket in with Mulesoft now too cause json request bodies which should be invalid due to the request schema definitions, are coming back with 400 HTTP code responses and not 422 as they should be, from the Mulesoft mock data server.

Here's the link to my question to Mulesoft BTW: http://gsfn.us/t/4qzqd

So that's the whole story.

Anyway I love RAML. It's the best.

jewelsjacobs avatar Jun 24 '15 20:06 jewelsjacobs

Maybe you want to help us to get Osprey as the mocking server into the api-designer? @blakeembrey can you help here please.

Do you still need to do a demo to the PayPal guys or anyone else?

BTW, whats the name of the API Director at PayPal? Is it Jason Harmon by any chance?

sichvoge avatar Jun 24 '15 21:06 sichvoge

@sichvoge yup thats him, he sent me a twitter DM:

We just did Swagger last month, I figured we should do a RAML night in the next few months. Email me we can chat more

I just responded to his DM letting him know I was working on the update with some help from y'all and linked to this issue so he can keep up to date on the progress.

I'm demoing the Anysoft stuff next week at Boundary.

jewelsjacobs avatar Jun 24 '15 21:06 jewelsjacobs

Sounds good, please let me know what I can do to help you! BTW, I will be not able to answer to you for the next couple of hours. I am in London and it's getting late ;)

sichvoge avatar Jun 24 '15 21:06 sichvoge

@jewelsjacobs any news, its been a while :)

sichvoge avatar Jul 27 '16 18:07 sichvoge

Hi @sichvoge!

No progress on this I'm afraid. I got caught up in other stuff. Still following the progress of this project and trying to sell RAML + API Design everywhere I go!

jewelsjacobs avatar Jul 27 '16 18:07 jewelsjacobs

Everywhere is awesome! :D Have you heard about the RAML MVP Program? You would make a great MVP ;)

sichvoge avatar Jul 29 '16 15:07 sichvoge