Gathering detailed insights and metrics for @open-rpc/mock-server
Gathering detailed insights and metrics for @open-rpc/mock-server
Gathering detailed insights and metrics for @open-rpc/mock-server
Gathering detailed insights and metrics for @open-rpc/mock-server
Provides a mock JSON-RPC API given an OpenRPC document.
npm install @open-rpc/mock-server
Typescript
Module System
Node Version
NPM Version
TypeScript (70.35%)
JavaScript (20.07%)
Shell (9.58%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
26 Stars
955 Commits
8 Forks
5 Watchers
17 Branches
10 Contributors
Updated on Nov 03, 2024
Latest Version
1.7.8
Package Id
@open-rpc/mock-server@1.7.8
Unpacked Size
36.52 kB
Size
10.59 kB
File Count
13
NPM Version
10.7.0
Node Version
20.12.1
Published on
May 09, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Provide a Mock server for an OpenRPC Document.
Given an OpenRPC document, Mock server will provide a mock implementation of the JSON-RPC api that:
method.result.schema: JSONSchema
.Running the mock server in service mode will run a JSON-RPC service that:
mock
. It takes an openrpc document, returns a url path postfix. Appending the path to the services url will give us a mock server for the document provided.https://mock.open-rpc.org
Mock server is generally meant to be run via CLI, however it can also be imported to your project. doing so will:
1npm i -g @open-rpc/mock-server
1npm i -S @open-rpc/mock-server
The default settings expect to find a file in the root of your project called open-rpc.json
. It will must be a valid OpenRPC document as validated by OpenRPC Metaschema, or an error will be returned.
1npm run mock-server
this will start an HTTP server on http://localhost:3333 (default settings)
Where my-open-rpc-document.json is a file in the current directory which is a valid OpenRPC document as validated by OpenRPC Metaschema.
1open-rpc-mock-server -d my-open-rpc-document.json
You can also provide a URL that will resolve the OpenRPC document in JSON format:
1open-rpc-mock-server -d https://raw.githubusercontent.com/open-rpc/examples/master/service-descriptions/simple-math-openrpc.json
Allows you to add documents to the running server as a JSON-RPC request. One mock server in service mode can handle a large number of mocked services at once with this configuration.
1open-rpc-mock-server --mode service
A server is running on http://localhost:3333 now. You can call the mock
method, and pass it your OpenRPC document, which will start mocking that service (under the returned url path).
https://mock.open-rpc.org/
hereHow to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/12 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More