-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[feature]: Mock Server #1598
Comments
As of now, there's no such feature to create mock APIs from Hoppscotch. But would definitely consider this if there's a major request for this feature. |
this will be a great feature, if we try something like this https://mockend.com/ |
@jatin33 thanks for your suggestion. I'll look into this asap. |
Hi @liyasthomas I, actually saw this request in the github externships. I actually had tried using I wanted the architecture to store the references(id's) to the Endpoints(new collection name) sub-collection(which would be a JSON object of the key value pairs entered by the user) in an array within the document of the user who created the mock-server, Something like this USER Doccument But I couldn't find any resources or examples to implement this into fruition.(Or Am i looking at it the wrong way?) I have already started working on this but would really love, if you could guide me on some Initial flow for implementing this the correct way as my current approach above seems unmaintainable to me(which could cause a load on Cloud Firestore) |
Hi @bhavukkalra I'd love to see your mvp. Also, we're still refining the feature and it's architecture. We'll think about this and let you know. |
Sorry for the late reply @liyasthomas, about the MVP(for what will be designed for Hoppscotch to incorporate MockServer). After The Above logic has been written, each request to a route can be handeled via, this piece of Code router.route('/:id')
.get(handle.getEndpoint)
.post(auth.authenticate, handle.IncorporateChanges)
.delete(auth.authenticate, handle.deleteObject) Also Would that be OK if I made the above prototype/MVP using Basic HTML and NodeJS for rapid prototyping? Just to show the Proof of Concept. After that it can be Integrated to Hoppscotch(NuxtJS) or should I start with NuxtJS to begin with? |
Hi, do we have a plan to support mocking POST request? e.g
|
"Mock requests" feature has the highest priority in our roadmap. Thanks for your patience, please bear with us and expect a beta release of Mock server soon. |
ya, and what should I do if I want to contribute to this feature? |
It's Still a Work in Progress, The MVP Presented above was made from a different Tech Stack and Had lot of Flaws(Reasonable, as it was just for a Proof of Concept). So, We are trying to do things the right way by making use of the appropriate tech stack(Which sometimes takes time, but is best for the long run). We know that there are a lot of requests for this feature to got out, but give us a little time more time and I assure you something is cooking in the Backend and you will see it very soon😉. |
+1 to see this new feature in Hoppscotch |
UPDATE: I went ahead and created a very basic implementation of mocks (see commit 63fe3f8) . It uses a hardcoded spec file and serves the responses quite well. The only ceavet is that it won't work without openapi specs, which I am currently working on. I've a little experience in this, while designing my openapi-designer. The basic idea is as follows:
Good thing is the backend is already in nodejs, which will support npm tool out of the box, via its api. Same will be helpful validating that the user's documentation is upto date (wrt the apis they have in collection). The only missing piece is the openapi spec generator (which will be pointless without response examples), for which we are still waiting. |
I need mock server in hopp, who else? |
Is there a plan to have mock server option in similar way as it is done in Postman?
It would be nice to have all in one testing tool (API testing + mocking APIs), I was looking for this option in hoppscotch, but i don't see it anywhere.
The text was updated successfully, but these errors were encountered: