Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@aida/injector-faked-routes
Advanced tools
The Faked Routes injector generates a flat object with all defined endpoints, similar in structure to the .endpoints.js file, except that data models are replaced with mocked data.
The Faked Routes injector depends on:
The main use case for this injector is to mock endpoints with fake data. For now, this injector is supposed to be used for request-response endpoints. There is no support for streaming, websockets, or GraphQL yet. Moreover, the only supported response content type is "application/json". The results from this injector can be used by the @aida/consumer-faked-http consumer to mock APIs without making network calls to a backend.
// This is an example of how the data generated by this injector looks like. For more details on how to use this with the faked-http consumer, check the consumer documentation.
const fakedRoutes = {
"/users": {
"put": {
"operationId": "updateUser",
"request": {
"body": {
"id": "27bd418b-05e0-4e40-9fb2-54a9ff7de038",
"email": "Katlynn_Upton@gmail.com",
"phoneNumber": "914.750.8191 x2376",
"firstName": "Bobby"
}
},
"response": {
"200": {
"application/json": {
"id": "27bd418b-05e0-4e40-9fb2-54a9ff7de038",
"email": "Katlynn_Upton@gmail.com",
"phoneNumber": "914.750.8191 x2376",
"firstName": "Bobby"
}
},
"400": {
"application/json": {
"description": "Quod officiis voluptatem dicta provident est. Aliquid sint aperiam."
}
}
}
}
},
"/users/{id}": {
"get": {
"operationId": "getUser",
"request": {
"path": {
"id": "27bd418b-05e0-4e40-9fb2-54a9ff7de038"
}
},
"response": {
"200": {
"application/json": {
"id": "27bd418b-05e0-4e40-9fb2-54a9ff7de038",
"email": "Katlynn_Upton@gmail.com",
"phoneNumber": "914.750.8191 x2376",
"firstName": "Bobby"
}
}
}
}
}
}
options
seed
: An integer to serve as the seed for the random data generation. Defaults to 12
.FAQs
Aida injector to create faked routes
The npm package @aida/injector-faked-routes receives a total of 8 weekly downloads. As such, @aida/injector-faked-routes popularity was classified as not popular.
We found that @aida/injector-faked-routes 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.