uridoc
v3.1.1
Published
An URI document generator which works with JSDoc-type comments.
Downloads
61
Readme
URI Doc
Generate URI document from comments.
Usage
Installation
npm install -g uridocRun
uridoc ./demo.js Document.mdAlso support glob(must be with quotation marks):
uridoc "./**/*Routes.js" Document.mdURI Definition Demo
/*
@uri
This is a test API.
Just for testing.
@get /api/v1/:part1/test/:part2
@request
@headers
header1:First header.
header2:Second header.
@path
part1 - First part.
part2 - Second part.
@query
query1=First query.
query2=Second query.
@body application/json
{
"a": String,// This is a.
"b": String,
}
@response
@headers
rheader1:First header.
rheader2:Second header
@body
{
"c": String,
"d": Number,
}
*/GET /api/v1/:part1/test/:part2
This is a test API.
Just for testing.
Request
Headers
Name | Description ---- | ----------- header1 | First header. header2 | Second header.
Path
Name | Description ---- | ----------- part1 | First part. part2 | Second part.
Query
Name | Description ---- | ----------- query1 | First query. query2 | Second query.
Body
{
"a": String,// This is a.
"b": String,
}Response
Headers
Name | Description ---- | ----------- header1 | First header. header2 | Second header.
Body
{
"c": String,
"d": Number,
}