
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.
@mocks-server/plugin-admin-api
Advanced tools
Plugin for Mocks Server. Provides a REST API for administrating settings, fixtures and behaviors
Plugin for Mocks Server that provides an API REST that allows to change dinamically the current behavior, change delay time, and another Mocks Server options.
This is very useful when running acceptance tests, as you can change the behavior of the api simply making an HTTP request in your tests before
method, for example.
This plugin is included in the main distribution of the Mocks Server project, so you can refer to the official documentation website.
adminApiPath
- Base path for the administration api. Default is "/admin". You should change it only if there is any conflict with the api you are mocking.adminApiDeprecatedPaths
- Boolean option, disables deprecated "/mocks" api path, which is still enabled by default.Read more about how to define options for the mocks-server plugins here.
Available api resources are:
GET
/admin/about
Returns plugin information.
{ "version": "1.2.0" }
GET
/admin/behaviors
Returns behaviors collection.GET
/admin/behaviors/:id
Returns an specific behavior.GET
/admin/fixtures
Returns fixtures collection.GET
/admin/fixtures/:id
Returns an specific fixture.GET
/admin/settings
Returns current server settings.
{ "delay": 0, behavior: "foo-behavior", path: "mocks" }
PATCH
/admin/settings
Changes current server settings.
{ "delay": 3000 }
Deprecated api resources under "/mocks" api path are still available.
Contributors are welcome. Please read the contributing guidelines and code of conduct.
FAQs
Mocks Server plugin providing an administration REST API
The npm package @mocks-server/plugin-admin-api receives a total of 15,642 weekly downloads. As such, @mocks-server/plugin-admin-api popularity was classified as popular.
We found that @mocks-server/plugin-admin-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.