{"id":21920342,"url":"https://github.com/mrtnvh/things-you-can-do-with-an-openapi-mocking-server","last_synced_at":"2026-04-12T18:03:05.964Z","repository":{"id":74956219,"uuid":"215053905","full_name":"mrtnvh/things-you-can-do-with-an-openapi-mocking-server","owner":"mrtnvh","description":"Some examples of things you can do in a front end project with Prism, an OpenAPI mocking server","archived":false,"fork":false,"pushed_at":"2023-07-07T23:03:38.000Z","size":599,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T21:52:51.366Z","etag":null,"topics":["cypress","docker","mocking-server","mocks","nuxt","openapi","prism"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrtnvh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-14T13:39:46.000Z","updated_at":"2021-07-27T21:20:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6e681a1-c117-457e-bcae-a58ab3bd744f","html_url":"https://github.com/mrtnvh/things-you-can-do-with-an-openapi-mocking-server","commit_stats":null,"previous_names":["mrtnvh/things-you-can-do-with-an-openapi-mocking-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtnvh","download_url":"https://codeload.github.com/mrtnvh/things-you-can-do-with-an-openapi-mocking-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244939533,"owners_count":20535439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress","docker","mocking-server","mocks","nuxt","openapi","prism"],"created_at":"2024-11-28T20:14:21.371Z","updated_at":"2026-04-12T18:03:05.888Z","avatar_url":"https://github.com/mrtnvh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Things you can to with an OpenAPI Mocking Server\n\nSome examples of things you can do in a front end project with [Prism](https://stoplight.io/open-source/prism/), an OpenAPI mocking server.\n\n- [Things you can to with an OpenAPI Mocking Server](#things-you-can-to-with-an-openapi-mocking-server)\n\t- [Requirements](#requirements)\n\t- [Installation](#installation)\n\t- [Run](#run)\n\t\t- [1. npm](#1-npm)\n\t\t- [2. Advanced JavaScript](#2-advanced-javascript)\n\t\t- [3. Docker](#3-docker)\n\t- [Tests](#tests)\n\n## Requirements\n- Node v10+\n- NPM v6+\n- Docker\n\n## Installation\n```sh\nnpm install\n```\n\n## Run\nThis example contains 2 processes:\n1. A [Nuxt.js](https://nuxtjs.org/) ([Vue.js framework](https://vuejs.org/)) application.\n2. A [Prism](https://stoplight.io/p/docs/gh/stoplightio/prism) mocking server.\n\nThere are several scenario's of how you can run de example code:\n\n### 1. npm\nStart up both processes through npm.\n```sh\nnpm run dev:all\n```\n\nRun only the Nuxt.js application.\n```sh\nnpm run dev\n```\n\nRun only the Prism mock.\n```sh\nnpm run mocks\n\n# With a watcher on the OpenAPI document\nnpm run mocks:watch\n```\n\n### 2. Advanced JavaScript\nIf the default Prism functionality doesn't meet your requirements, you could run Prism programmatically and plugin on the [Fastify](https://www.fastify.io/) instance that Prism uses as server.\n```sh\nnpm run mocks:advanced\n\n# With a watcher on the OpenAPI document\nnpm run mocks:advanced:watch\n```\n\nThe command will run the `mocks/runner.js` with Node.\n\n### 3. Docker\nPrism also provides a [Docker image](https://stoplight.io/p/docs/gh/stoplightio/prism/docs/getting-started/installation.md#docker) on which you can mock your OpenAPI document.\n\n```sh\ndocker run --rm -it -p 4010:4010 -v $(pwd):/tmp stoplight/prism:3 mock -d -h 0.0.0.0 \"mocks/prism.js\"\n```\n\n## Tests\nThis example uses [Cypress](https://www.cypress.io/) for integration/e2e\n\nStart the Cypress UI\n```sh\nnpx cypress open\n```\n\nRun Cypress in the CLI\n```sh\nnpx cypress run\n```\n\nAll Cypress related files are located in the `cypress` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtnvh%2Fthings-you-can-do-with-an-openapi-mocking-server/lists"}