Giter Site home page Giter Site logo

rigwild / apidoc-markdown Goto Github PK

View Code? Open in Web Editor NEW
79.0 3.0 42.0 2.11 MB

📝 Generate a Simple and Portable Markdown documentation for your API

Home Page: https://npmjs.com/package/apidoc-markdown

License: MIT License

JavaScript 1.90% TypeScript 98.10%
apidoc markdown api-documentation generator programmatic command-line mardown-documentation portable

apidoc-markdown's People

Contributors

alajmo avatar cerkiewny avatar enix223 avatar josegoncalves avatar martinj avatar minigugus avatar rigwild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

apidoc-markdown's Issues

@apiBody and @apiQuery doesn't work

Describe the bug

@apiBody and @apiQuery don't work. I assumed that they would have to run like @apiParam, so I made a copy of the Parameters area in my own md template. But without success.
When I took a closer look, I noticed that the key "fields" was completely missing in the data - subs - query/body object.

Reproduce

Usage

Use apidoc-markdown command.

apidoc-markdown -p ./example/basic -o ./example/basic/example.md -t ./myOwnTemplate.md

Expected behavior
I assumed that @apiBody and @apiQuery would have to run like @apiParam

Versions (please complete the following information):

  • Node.js version: 14.18.1
  • apidoc-markdown version: 7.0.1

Additional context

<% if (sub.parameter && sub.parameter.fields) { -%>
<% Object.entries(sub.parameter.fields).forEach(([parametersGroup, parametersGroupContent]) => { -%>

### Parameter - `<%= parametersGroup -%>`

| Name     | Typ        | Beschreibung                          |
|----------|------------|---------------------------------------|
<% parametersGroupContent.forEach(param => { -%>
| <%- param.field -%> | <%- param.type ? `\`${param.type}\`` : '' %> | <%- param.optional ? '**optional** ' : '' -%><%- param.description -%>
<% if (param.defaultValue) { -%>
_Default value: <%= param.defaultValue %>_<br><% } -%>
<% if (param.size) { -%>
_Size range: <%- param.size %>_<br><% } -%>
<% if (param.allowedValues) { -%>
_Allowed values: <%- param.allowedValues %>_<% } -%> |
<% }) // foreach parameters -%>
<% }) // foreach param parameter -%>
<% } // if parameters -%>

<%- Object.keys(sub.body[0]) %>
<%- Object.keys(sub.parameter.fields.Parameter[0]) %>

Cannot read property 'Header' of undefined

[owen@localhost mgt]$  apidoc-markdown -p public/ -o doc.md
(node:24808) ExperimentalWarning: The fs.promises API is experimental
(node:24808) UnhandledPromiseRejectionWarning: TypeError: ejs:29
    27| <%- sub.type.toUpperCase() %> <%= sub.url %>
    28| ```
 >> 29| <% if (sub.header && sub.header.fields.Header.length) { -%>
    30| ### Headers
    31| | Name    | Type      | Description                          |
    32| |---------|-----------|--------------------------------------|

Cannot read property 'Header' of undefined
    at group.subs.forEach.sub (eval at compile (/home/owen/.nvm/versions/node/v10.16.3/lib/node_modules/@rigwild/apidoc-markdown/node_modules/ejs/lib/ejs.js:652:12), <anonymous>:73:44)
    at Array.forEach (<anonymous>)
    at data.forEach.group (eval at compile (/home/owen/.nvm/versions/node/v10.16.3/lib/node_modules/@rigwild/apidoc-markdown/node_modules/ejs/lib/ejs.js:652:12), <anonymous>:57:19)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (/home/owen/.nvm/versions/node/v10.16.3/lib/node_modules/@rigwild/apidoc-markdown/node_modules/ejs/lib/ejs.js:652:12), <anonymous>:49:13)
    at anonymous (/home/owen/.nvm/versions/node/v10.16.3/lib/node_modules/@rigwild/apidoc-markdown/node_modules/ejs/lib/ejs.js:682:17)
    at Object.singleCompiler (/home/owen/.nvm/versions/node/v10.16.3/lib/node_modules/@rigwild/apidoc-markdown/dist/generator.js:100:57)
    at Object.exports.generateMarkdown (/home/owen/.nvm/versions/node/v10.16.3/lib/node_modules/@rigwild/apidoc-markdown/dist/generator.js:114:31)
(node:24808) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:24808) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

this exists in all version

Markdown tables should be preceded by a newline

Describe the bug

I have a markdown page that uses table layout, and it shows correctly as table in a VS Code markdown preview plugin, but when I check it into GitHub, it doesn't display the tables correctly but rather displays the table markdown.

Markdown:

Inputs

type name description
address _user address of certificate owner
bytes32 _hash sha256 hash of the certificate text

This shows on the page when viewed in GitHub:

Inputs | type | name | description | | ---- | --- | --- | | address | _user | address of certificate owner | | bytes32 | _hash | sha256 hash of the certificate text |

Reproduce

Usage

Used apidoc-markdown command or script.

apidoc-markdown -p apidocs/ -o docs/index.md

Expected behavior
A clear and concise description of what you expected to happen.

Inputs

type name description
address _user address of certificate owner
bytes32 _hash sha256 hash of the certificate text

Versions (please complete the following information):

  • Node.js version: 12.13.1
  • apiDoc version: 0.22.1
  • apidoc-markdown version: 5.1.0

Additional context
Problem was first reported here:
https://stackoverflow.com/questions/51579966/markdown-tables-not-displayed-on-a-github-md-page

require() of ES Module not supported

Describe the bug

After upgrading from 7.2.5 to 7.3.0 I'm unable to generate my API docs because the command aborts with error.
The error that I get is this:

/home/jmpg/INOV-Git/PRR-ECP/WRP-SRV/node_modules/apidoc-markdown/bin/index.js:12
require('update-notifier')({ pkg: require('../package.json') }).notify()
^

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/jmpg/INOV-Git/PRR-ECP/WRP-SRV/node_modules/update-notifier/index.js from /home/jmpg/INOV-Git/PRR-ECP/WRP-SRV/node_modules/apidoc-markdown/bin/index.js not supported.
Instead change the require of /home/jmpg/INOV-Git/PRR-ECP/WRP-SRV/node_modules/update-notifier/index.js in /home/jmpg/INOV-Git/PRR-ECP/WRP-SRV/node_modules/apidoc-markdown/bin/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/jmpg/INOV-Git/PRR-ECP/WRP-SRV/node_modules/apidoc-markdown/bin/index.js:12:1) {
  code: 'ERR_REQUIRE_ESM'
}

Node.js v18.13.0

Reproduce

Usage

Used apidoc-markdown command or script.

apidoc-markdown -i src -o api.md

Expected behavior
apidoc-markdown executes without errors.

Versions (please complete the following information):

  • Node.js version: 18.13.0
  • apidoc-markdown version: 7.3.0

Dist in repo

The build directory /dist is committed in the repository. It should be removed and use files in package.json.

`--prepend` option doesn't work well

Describe the bug

--prepend option expect filename as value, but displays as file path not file content.

Reproduce

Usage

Used apidoc-markdown command or script.

apidoc -i ./src/actions -i ./docs -o ./.apidoc && apidoc-markdown -p ./.apidoc -o ./README.md -t docs/apidoc-template/apidoc.ejs --prepend ./docs/before.md

Expected behavior
Content from ./docs/before.md are displayed in documentation.

Actual
File path on 43:
image

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'access' of undefined

Already using "ApiDoc" for generation API documentation. Now I want convert it into markdown.
Then I installed "apidoc-markdown" using below command in my linux system

sudo npm install apidoc-markdown -g

then I tried with below command to generate markdown document

apidoc -f ".*\\.php$" -i /var/www/html/project-1/src/ -o /var/www/html/api-doc/

API doc generated successfully with "api_data.json" and "api_project.json" file

Then I run below command

apidoc-markdown -p /var/www/html/api-doc/ -o /var/www/html/api-mk-doc/

Then I am getting below error:

(node:28779) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'access' of undefined
    at Object.exports.pathExists (/usr/local/lib/node_modules/apidoc-markdown/dist/utils.js:24:6)
    at Object.exports.generateMarkdownFileSystem (/usr/local/lib/node_modules/apidoc-markdown/dist/generator.js:111:23)
    at Object.<anonymous> (/usr/local/lib/node_modules/apidoc-markdown/bin/index.js:9:26)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
(node:28779) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:28779) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can you please help me out?

I am using Ubuntu : 18.04 LTS system

adding @apiHeader breaks compilation

Describe the bug

When I add @apiHeader to any of the existing blocks, the compilation breaks with the exception:

(node:12928) UnhandledPromiseRejectionWarning: TypeError: ejs:28
    26| <%- sub.type.toUpperCase() %> <%= sub.url %>
    27| ```
 >> 28| <% if (sub.header && sub.header.fields && sub.header.fields.Header.length) { -%>
    29|
    30| ### Headers
    31| | Name    | Type      | Description                          |

Cannot read property 'length' of undefined
    at group.subs.forEach.sub (eval at compile (censored\node_modules\ejs\lib\ejs.js:626:12), <anonymous>:73:72)
    at Array.forEach (<anonymous>)
    at data.forEach.group (eval at compile (censored\node_modules\ejs\lib\ejs.js:626:12), <anonymous>:57:19)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (censored\node_modules\ejs\lib\ejs.js:626:12), <anonymous>:49:13)
    at anonymous (censored\node_modules\ejs\lib\ejs.js:656:17)
    at Object.exports.generate (censored\node_modules\apidoc-markdown\dist\generator.js:69:37)
    at Object.exports.generateMarkdownFileSystem (censored\node_modules\apidoc-markdown\dist\generator.js:127:35)
(node:12928) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
(rejection id: 1)
(node:12928) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Breaks even with the header from apidoc documentation:
@apiHeader (MyHeaderGroup) {String} authorization Authorization value.

Reproduce

Usage

Used apidoc-markdown command or script.

api_project.json

{
  "name": "censored",
  "description": "REST API censored",
  "template": {
    "withCompare": false,
    "withGenerator": false,
    "aloneDisplay": false
  }
}

api_data.json

Used api_data.json file: can't provide, but nothing really special.

Expected behavior
Documentation compiles without exception

Versions (please complete the following information):

  • Node.js version: 10.15.3
  • apiDoc version: "~0.20.1
  • apidoc-markdown version: ~5.0.0

@apiParamExample not rendering

The parameter @apiParamExample is not rendering in markdown, but in HTML is.

Using first the apidoc regular command over the Python Flask file:

apidoc -f ".*\\.py$" -o docs/

Then, generate the markdown files:

 apidoc-markdown -p docs/ -o docs/readme.md

Missing required argument: apiDocPath

Hello,

when I set parameter --path, the script throws an error:

Missing required argument: apiDocPath

When using the alias -p, it works well.

Node version: v12.7.0
NPM version: 6.13.0
Package version: 3.0.0

@apiError is not generated on markdown

apidoc-markdown isn't generating @apiError parameters.

I'm generating markdown file based on these comments:

/**
   * @api {get} /insured Get Insured
   * @apiGroup Insured
   * @apiName GetInsured
   * @apiParam (QueryString) {String} cpf   CPF do segurado
   * @apiParam (QueryString) {String} [email] E-mail do segurado. Não deve ser informado quando 'origin=backoffice' for informado.
   * @apiParam (QueryString) {String} [origin] Local de origem da chamada de API. Deve ser usado o valor 'backoffice' quando a chamada for feita pela interface de atendimento.
   * @apiExample {curl} Exemplo de requisição:
   *    curl -i http://localhost:7013/insured?cpf=000000000
   * @apiError 400 CPF não informado
   * @apiErrorExample {json} Erros 400 - Validação de campos
       { "errors": ["CPF não informado", "E-mail não informado"] }
   */

When I open index.html file from apiDoc , I can see this table:
image

But I can't find similar table or information when I open the markdown file, as you can see in this gist

Confusing files

How do you create the required api_data.json and api_project.json? There is no documentation regarding the creation of those files.
In case the ones in the examples directory can be simply copied into our own project source folder then it would be better to have them used along with the default template by default.
If the files are supposed to be specific to our project then the guidelines as to how to create (or generate) those files would be helpful.

Support the settings of `header` and `footer` in api_project.json

Describe the bug

No header and footer support in api_project.json.

Reproduce

Usage

Used apidoc-markdown command or script.

apidoc -i mycode/ doc/
apidoc-markdown -p doc/ -o index.md

apidoc.json

The apidoc.json file is:

{
    "name": "test",
    "version": "0.1.2",
    "description": "test",
    "title": "test",
    "url": "https://test.example.com/",
    "header": {
        "filename": "doc/header.md"
    },
    "footer": {
        "filename": "doc/footer.md"
    }
}

doc/header.md

All inputs and outputs are `application/json` implicitly.

doc/header.md

Empty file, 0 size.

Expected behavior
The wordings in doc/header.md should be put into index.md in this case.

Versions (please complete the following information):

  • Node.js version: 14.16.0
  • TypeScript version: N/A
  • apiDoc version: 0.27.1
  • apidoc-markdown version: 5.2.2

Adding @apiHeader with group fails compilation

Describe the bug

When compiling the documentation (using apidoc first), adding the following causes a fatal error to be thrown:

/**
 * <snip>
 * @apiHeader (Response Headers) {String} Location Valid location
 * <snip>
 */

The error:

$ npm run docs

> @company/[email protected] docs /mnt/s1/company/app
> run-s docs:apidoc docs:apidoc:md


> @company/[email protected] docs:apidoc /mnt/s1/company/app
> apidoc -i source -o docs


> @company/[email protected] docs:apidoc:md /mnt/s1/company/app
> apidoc-markdown -p docs -o API.md

(node:16237) UnhandledPromiseRejectionWarning: TypeError: ejs:28
    26| <%- sub.type.toUpperCase() %> <%= sub.url %>
    27| ```
 >> 28| <% if (sub.header && sub.header.fields && sub.header.fields.Header.length) { -%>
    29| 
    30| ### Headers
    31| | Name    | Type      | Description                          |

Cannot read property 'length' of undefined
    at eval (eval at compile (/mnt/s1/company/app/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:649:12), <anonymous>:71:72)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (/mnt/s1/company/app/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:649:12), <anonymous>:55:19)
    at Array.forEach (<anonymous>)
    at eval (eval at compile (/mnt/s1/company/app/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:649:12), <anonymous>:47:13)
    at anonymous (/mnt/s1/company/app/node_modules/apidoc-markdown/node_modules/ejs/lib/ejs.js:679:17)
    at Object.exports.generate (/mnt/s1/company/app/node_modules/apidoc-markdown/dist/generator.js:69:37)
    at Object.exports.generateMarkdownFileSystem (/mnt/s1/company/app/node_modules/apidoc-markdown/dist/generator.js:127:35)
(node:16237) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16237) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Reproduce

Usage

Clone the repository at https://github.com/perry-mitchell/example-apidoc

Run npm install and npm run docs to reproduce the error.

api_project.json

Used api_project.json file.

{
    "name": "Test API",
    "version": "1.0.0",
    "description": "API for testing",
    "template": {
        "forceLanguage": "en"
    }
}

api_data.json

Used api_data.json file.

none

Expected behavior
The documentation should build without error.

Versions (please complete the following information):

  • Node.js version: 12.16.1
  • TypeScript version: none
  • apiDoc version: 0.22.1
  • apidoc-markdown version: 5.0.2

Additional context
Seems like this was addressed in #10 but subsequently closed without resolution. The issue for me seems like the group in the @apiheader line causes the issue. Removing it fixes the issue. This is contrary to the documentation.

In #10 it was also mentioned that the examples work, but note that the current apidoc-markdown codebase doesn't seem to include an example for the group.

I got the idea for adding the group from this post, as there was no clear way to document response headers.

apidoc.json only in input dir works

Describe the bug

apidoc.json is only processed if it is placed in the input dir (e.g. src).

If you place it in the project folder or in package.json it wont get processed.

apidoc-markdown -i src -o apidoc

apidoc-markdown no longer working with apidoc 0.50.0

Describe the bug

In the latest version of apidoc (0.50.0), the api_data.json and api_project.json files are no longer generated. This results in a crash for apidoc-markdown. I already discussed this with the apidoc maintainer here and he said he'll implement them again, but as a single file, so there will be some changes necessary on apidoc-markdown too. Just wanted to let you know. If you don't have the time, I'll give it a go once it's implemented in apidoc.

Reproduce

Run apidoc
Run apidoc-markdown

Expected behavior
A generated markdown apidoc

Versions (please complete the following information):

  • Node.js version: 14
  • apiDoc version: 0.50.0
  • apidoc-markdown version: 6.0.1

Unable to generate docs marked with @apiPrivate as --private argument is not working

Describe the bug

Unable to generate docs marked with @apiPrivate as --private argument is not working

Reproduce

Usage

Contents of test/test.js

/**
 * @api {get} /api/public-endpoint Public Endpoint
 * @apiName PublicEndpoint
 * @apiGroup ExampleApi
 */

/**
 * @apiPrivate
 * @api {post} /api/private-endpoint Private Endpoint
 * @apiName PrivateEndpoint
 * @apiGroup ExampleApi
 */

Used apidoc-markdown with --private argument to generate docs with both public and private endpoints
but output index.md only shows public endpoint.

apidoc-markdown --input test/ --output test/index.md --private --verbose --debug

Parsed options showed that private flag was set to true.

[debug] Parsed options:
{
  _: [],
  input: 'test/',
  i: 'test/',
  output: 'test/index.md',
  o: 'test/index.md',
  private: true,
  p: true
}

But debug logs said that private flag was set to false.

debug: inspect file: test/test.js
debug: size: 240
debug: count blocks: 2
debug: count elements in block 0: 3
debug: count elements in block 1: 4
debug: api found in block: 0
debug: private flag is set to false and apiPrivate found in block: 1
debug: found @api in block: 0
debug: found @apiName in block: 0
debug: found @apiGroup in block: 0

package.json

Used apidoc key in package.json file.

{
  "apidoc": {
    "name": "API Documentation",
    "title": "Sample API",
    "url": "http://localhost"
  }
}

Expected behavior
Expected to see private endpoint marked with @apiPrivate to appear in generated docs.
Tested with apidoc and private endpoint was generated, i.e. apidoc --input test/ --output test/ --single --private --verbose --debug

Versions (please complete the following information):

  • Node.js version: complete_this [e.g. 16.15.0]
  • apiDoc version: complete_this [e.g. 0.53.1]
  • apidoc-markdown version: complete_this [e.g. 7.22.0]

The -e <exclude-folders> option does not work

Describe the bug

apiDoc supports an option to exclude sub-directories, -e. But apidoc-markdown drops that, so the underlying apiDoc barks and fails. Running apidoc directly works.

Reproduce

Usage

Working command:
apidoc -i . -e node_modules -o abcd.html

Failing command:
apidoc-markdown -i . -e node_modules -o abcd.html
Causes this output:

D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\parser.js:301
          throw new ParserError('Empty parser result.',
                ^
ParserError: Empty parser result.
    at Parser._parseBlockElements (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\parser.js:301:17)
    at Parser.parseSource (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\parser.js:174:15)
    at Parser.parseFile (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\parser.js:138:15)
    at Parser.parseFiles (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\parser.js:113:29)
    at D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\index.js:174:20
    at Array.forEach (<anonymous>)
    at Object.parse (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\core\index.js:169:19)
    at createDoc (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\node_modules\apidoc-light\lib\index.js:79:22)
    at createDocOrThrow (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\dist\utils.js:76:46)
    at Object.generateMarkdownFileSystem (D:\AppData\Roaming\nvm\v16.13.1\node_modules\apidoc-markdown\dist\generator.js:118:79) {
  file: '.\\functions\\node_modules\\aws-sdk\\dist\\aws-sdk-core-react-native.js',
  block: 35,
  element: 'api',
  source: '@api private\n' +
    '@!macro [new] nobrowser\n' +
    '  @note This feature is not supported in the browser environment of the SDK.',
  extra: [
    {
      File: '.\\functions\\node_modules\\aws-sdk\\dist\\aws-sdk-core-react-native.js'
    },
    { Block: 35 },
    { Element: '@api' },
    {
      Source: '@api private\n' +
        '@!macro [new] nobrowser\n' +
        '  @note This feature is not supported in the browser environment of the SDK.'
    }
  ]
}

api_project.json

Not used api_project.json file.

api_data.json

Used api_data.json file.

{
  "name": "My APIs",
  "version": "0.1.0",
  "description": "APIs for my product",
  "title": "My APIs",
  "url": "https://example.com/my_apis"
}

Expected behavior
That the sub-directories named in -e be ignored for the parsing.

Versions (please complete the following information):

  • Node.js version: 16.3.1
  • apiDoc version: 0.50.3
  • apidoc-markdown version: 7.0.2

Additional context
Only js files in code.

api names order under group is ignored

Describe the bug

Order of the API names of groups specified in apidoc.json is ignored both with the single output file and output per file per group.

Reproduce

Usage

apidoc-markdown --multi --createPath -p ../routes_doc -o ../routes_doc/md

api_project.json

Used api_project.json file.

{
  "name": "example_api",
  "version": "0.1.0",
  "description": "Example API",
  "title": "Example API",
  "order": [
    "MyGroup1",
    "Method3",
    "Method1",
    "Method2"
  ]
}

api_data.json

Used api_data.json file.

[
  {
    "group": "MyGroup1",
    "type": "post",
    "url": "/my_group_1/example_1",
    "title": "Example 1",
    "name": "Example1",
    "version": "0.0.0",
    "filename": "temp/annotations.ts",
    "groupTitle": "MyGroup1"
  },
  {
    "group": "MyGroup1",
    "type": "post",
    "url": "/my_group_1/example_2",
    "title": "Example 2",
    "name": "Example2",
    "version": "0.0.0",
    "filename": "temp/annotations.ts",
    "groupTitle": "MyGroup1"
  },
  {
    "group": "MyGroup1",
    "type": "post",
    "url": "/my_group_1/example_3",
    "title": "Example 3",
    "name": "Example3",
    "version": "0.0.0",
    "filename": "temp/annotations.ts",
    "groupTitle": "MyGroup1"
  }
]

Expected behavior
The output markdown files for groups to respect the provided order of API names in apidoc.json

Versions (please complete the following information):

  • Node.js version: 10.19.0
  • TypeScript version: 3.7.2
  • apiDoc version: 0.20.1
  • apidoc-markdown5.0.0`

Not generating entry for each comment block when not providing `@api` title

Describe the bug

apidoc-markdown is not creating entries for each comment block endpoint.

Reproduce

I created a small repo here demonstrating the issue. I committed the API.md file but run yarn doc to regenerate.

Usage

I created a small repo here demonstrating the issue. I committed the API.md file but run yarn doc to regenerate.

Expected behavior
I would have expected an entry for each comment-block definition. Instead I only got one.

Versions (please complete the following information):

  • Node.js version: 16.3.2
  • apiDoc version: 0.53.1
  • apidoc-markdowwwn version: 7.2.4

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.