Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mockserver mocks import #948

Open
robertonav20 opened this issue Oct 22, 2023 · 9 comments
Open

Mockserver mocks import #948

robertonav20 opened this issue Oct 22, 2023 · 9 comments
Labels
help wanted keep-open Explicitily keep open

Comments

@robertonav20
Copy link
Contributor

Reason/Context

Hi,
in my case i have a lot of mocks by mockserver json and i want to migrate easily to microcks because is more developer friendly.
Do you want support this use case?

Description

As i describe before, i have a lot of mockserver json mocks and i want to migrate to microcks, the scaffolding of expecatations are:

expecations/users/user.json
expecations/companies/company.json
...

Implementation ideas

i don't know how the import export service works but i think is possible to create a DTO input object and remap to microcks model structure like mapstruct

Are you think is doable?

@lbroudoux
Copy link
Member

Hi Roberto,
Thanks for your message and your interest in Microcks 😉

Currently, we have no plan regarding a mockserver (are you thinking about https://www.mock-server.com/?) importer but we always welcome suggestions and contributions!

Thinking out loud, I would say that there are 2 ways of doing this kind of thing:

  • Directly write a MockRepositoryImporter implementation that will live into the application and allow to import mockserver resources into Microcks directly,
  • Or write an autonomous conversion tool that will allow converting mockserver resources into ones that Microcks may ingest (this may be Postman Collection, HAR file or Microcks snapshots directly).
    I would prefer the 2nd option as I think that MockRepositoryImporter should focus on "standard artifacts" (OpenAPI, GraphQL, HAR, ...) and as I think that autonomous conversion may also provide a more flexible way of doing things (ex: integrating customization via pre or post-processing OR mapping external concepts to our dispatcher and dispatching rules that may be complex to match external matchers concepts).

We would be super happy to host this tooling in the Microcks ecosystem! Maybe starting a new initiative of community converters to welcome mockserver-to-microcks or <other-tool>-to-microcks whatever the "other". It would be awesome!

As I don't know the mockserver resources format, I don't know if this option is really feasible, but please have a look at the snapshot format and let us know your feelings on this!

@robertonav20
Copy link
Contributor Author

Hi @lbroudoux,
i'm sorry for the delay, anyway yes i'm talking of https://www.mock-server.com/ and regard the proposal i answer point for point:

  • The first options is more simple to make because after mapping i can call the X Repository or other X ImportService to store the new mock/mocks
  • In this way i'm agree with you which this approach is more stable and it's similar to a plugin/marketplace where choose your best option to reach goal.

So, i follow you in this solution mockserver-to-microcks.
Here https://github.com/mock-server/mockserver/blob/master/mockserver-examples/json_examples.md you can find a md with some example of mockserver mocks.

How to make it? What's standard type we should use, HAR, OpenAPI or ?
I open to every suggestion, from my side i need to make some research and think about this topic

@robertonav20
Copy link
Contributor Author

Hi @lbroudoux,
i have created this repository in my github account https://github.com/robertonav20/mockserver-to-microcks to start with mockserver-to-microcks

@lbroudoux
Copy link
Member

Awesome! I have had some days off and I just came back. I'll have a look at it as soon as possible!

@lbroudoux
Copy link
Member

Hey @robertonav20
Sorry for the very long absence; we've been through a tunnel of travels and events...
I'd really like to re-connect and get the status of our above-mentioned repository. Is it feature complete? Have you written some demo? Do you plan to write some article to promote it? Ping me so that we can organize a quick call.

@robertonav20
Copy link
Contributor Author

Hi @lbroudoux,
I've started with a simple mock and get the related swagger then I've to import on microcks, it works!

But like you I don't have too much time to work on,

Anyway to proceed I think it is necessary to

  • create a repository inside microcks instead of my repo
  • define which use case supports, because maybe some use case is useless or not managed by microcks

Thanks in advance

@lbroudoux
Copy link
Member

Awesome! That is great progress!

Do you think we can start promoting this one to the community?
Would you have some time to put together an introduction documentation or article we could publish?

We have to think about how and where to integrate this great work... I see different options at the moment:

  • Having a dedicated repo for your tool
  • Creating something like a microcks-community-tools repo and put your tool within, spotting you as a maintainer if you wish.
  • Creating a dedicated GH organization (like quarkus did with quarkiverse) to have your own repo there? (it's maybe a bit early for that... 😉 )

What do you think?

@robertonav20
Copy link
Contributor Author

Hi @lbroudoux,
it's a very pleasure to contribute, so about your suggestion I think the best option is the "quarkiverse" but I agree with you which is too much so the best option is the second

A repo under microcks GH and the project is a multi module where a module manages a specific tool

Do you agree with this perspective?

About the maintainer i have some doubts and I think I haven't had too much time but we can talk about that.

And yes we can organise a quick call

Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale State due to inactivity label Jan 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2024
@lbroudoux lbroudoux reopened this Feb 13, 2024
@lbroudoux lbroudoux added keep-open Explicitily keep open help wanted and removed stale State due to inactivity labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted keep-open Explicitily keep open
Projects
None yet
Development

No branches or pull requests

2 participants