
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A mock server generated from an arbitrary Swagger file. Supports seeding, timeouts, response picking, entity memory, semantic action inference, etc.
A mock server generated from an arbitrary Swagger file. Supports seeding, timeouts, response picking, entity memory, semantic action inference, etc.
Syntax:
pokemock <swagger-url-or-file> [-h] [-v] [-w] [-p <port>]
Options:
-h, --help Show help
-v, --version Show version
-p, --port <port> Set server port, default is 8000
-w, --watch Watch mode: Restart on Swagger changes
-k, --killable Publish /kill endpoint to stop the service
The mock server listens to the specified port and
mocks endpoints defined in the provided Swagger document.
Additionally, it publishes a Swagger UI under /ui
,
the Swagger API under /api-docs
and a /kill
endpoint for shutdown.
Using optional headers, clients can control the server's behavior:
<definitionName|attributeName>: <size>
pairs<jsonPath>: <data>
pairs<data>
is arbitrary JSONWhenever an entity containing an ID is generated it is remembered by the server. If the entity is requested again, the remembered data is returned. This also applies to sub-entities across endpoints.
Additionally, the server tries to infer semantic actions from requests, such as:
These actions are applied to known entities in memory. For example, requesting a deleted entity will result in a 404 response.
Pokemock provides a set of Express middlewares
which you can use independently.
The default app defined in createDefaultApp.js
is an opinionated stack of
middlewares which you're encouraged to hack on.
By re-arranging and adding middlewares (especially generators)
you can tailor Pokemock to fit your APIs.
FAQs
A mock server generated from one or more arbitrary Swagger files. Supports seeding, timeouts, response picking, entity memory, semantic action inference, etc.
The npm package pokemock receives a total of 4 weekly downloads. As such, pokemock popularity was classified as not popular.
We found that pokemock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.