knuckleswtf / scribe-js Goto Github PK
View Code? Open in Web Editor NEWGenerate API documentation for humans from your Node.js codebase.
Home Page: https://scribe.knuckles.wtf/nodejs/
Generate API documentation for humans from your Node.js codebase.
Home Page: https://scribe.knuckles.wtf/nodejs/
What happened?
After generating the documentation I noticed that request body examples are missing
Screenshots or stack traces:
My environment:
node -v
): v14.16.1npm list @adonisjs/core
or npm list express
or npm list restify
): [email protected]npm list @knuckleswtf/scribe
): @knuckleswtf/[email protected]My Scribe config (minus the comments):
Additional info:
The openapi.yaml that is generated has examples in it but the postman collections generate doesn't
Hello, first of all thank you for this library 🚀
Is the support of Adonis V5 planned ? In progress ? Do you need help with this?
I use the version for Laravel and I would love to use it for my projects with Adonis as well.
Thanks
Does scribe library supports routes which are imported from different files in expressjs 4.x? I have divided routes into different files and sub files under it for better management like this:
// front routes
require('./app/routes/front')(app);
Code of app/routes/front/index.js
module.exports = function(app) {
var routeFiles = fs.readdirSync(path.join(__dirname, 'router/'))
routeFiles.forEach(function(file) {
if (file === 'index.js' || file.substr(file.lastIndexOf('.') + 1) !== 'js') {
return;
}
var name = file.substr(0, file.indexOf('.'));
app.use('/', require('./router/' + name));
});
}
// admin routes
require('./app/routes/admin')(app);
I'm unable to generate api docs. It always gives me undefined handlers on @knuckleswtf\scribe-express\src\get_routes.js
[Line no. 55]
Any idea what am I missing over here?
Thank you
I've read the documentation and I can't find details on how to achieve this.
All endpoints have the "lang" param.
How do i specify the details and example for it generally without adding it to every route doc block?
Also scribe generates random value for it on every route
Hello! I would love for you to go ahead and add a license your software!
Most OSS like this one tend to be MIT
Thanks :)
Is this library compatible with AdonisJS v5?
Hi,
I try to use your package for generate docs of my nodeJS API based on overridden Express
I arrive to generate one config file (00.yaml) with all my endpoints. And i would like define Group / title and description in it.
It's ok for title / description but when i put groupName in metaData and when i launch the generate command.
It's work once;
If i want to relaunch it, while it was explose it in multiple files (00.yaml, 01.yaml…), he rebase it on app router and so it loose title / description and groups..
Sorry for my english, i 'm french
Say me if i'm not clear
Thnaks a lot
What happened?
npx scribe:generate
...My environment:
node -v
): 14.17.2npm list @adonisjs/core
or npm list express
or npm list restify
): npm list express : [email protected]npm list @knuckleswtf/scribe
):2.0.0My Scribe config (minus the comments):
Additional info:
I have the following
/**
* Here be my title
*
* And this is a description
*
* @urlParam {string} theParam required This should be the description. Example: its-a-string
* @urlParam {int} anotherParam This is another description
*/
server.get('/:theParam/:anotherParam', (req, res, next) => {
...
It seems that the @urlParam
parser is ... exiting early? I can't provide a screenshot for unimportant reasons. But, what I get as output in the html page here is the "URL Parameters" header followed by
theParam string
anotherParam string
It is completely ignoring everything other than the @urlParam
and the variable name tokens on those lines. The example text isn't used in the example request. The description is completely missing. required
vs not having it there makes no difference. And the type is even ignored (as the int
is showing in the doc as string
).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.