We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I implemented a controller that send mocks response using json-schema-faker v0.4.7. myController.js
const jsf = require('json-schema-faker'); jsf.option({ optionalsProbabilty: 0.5 }); const jsonSchema = require("exegesis/lib/utils/jsonSchema"); exports.getPartenaireById = function getPartenaireById(context) { const path = `${context.api.operationPtr}/responses/200/content/application~1json/schema`; let schema = jsonSchema.extractSchema(context.api.openApiDoc, path); const mock = jsf(schema); return mock; }
Perhaps you have a good solution to make it generic and integrate it in the core or in a plugin?
Thanks
The text was updated successfully, but these errors were encountered:
Oh, very slick! It would be very cool to have this as a plugin.
Sorry, something went wrong.
No branches or pull requests
I implemented a controller that send mocks response using json-schema-faker v0.4.7.
myController.js
Perhaps you have a good solution to make it generic and integrate it in the core or in a plugin?
Thanks
The text was updated successfully, but these errors were encountered: