Skip to content
New issue

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

Use apiDefine to set a global apiVerion #1346

Open
Stimm4 opened this issue Mar 6, 2023 · 2 comments
Open

Use apiDefine to set a global apiVerion #1346

Stimm4 opened this issue Mar 6, 2023 · 2 comments

Comments

@Stimm4
Copy link

Stimm4 commented Mar 6, 2023

Describe the bug

With NodeJS project using several pages, I need to set the latest version of all functions documentated. To do this I use apiDefine that is use as below, but on my documentation, the version is still 0.0.0. Whereas, the api_doc version is at 0.1.0.

Steps to reproduce

apidoc.json:
{ "name": "Documentation du Sokoro", "version": "0.1.0", "description": "", "header": { "title": "Scripts extra logiciel", "filename": "header.md" } }

Header.js:
`/**

/**

  • @api {variable} ethConfObj ethConfObj
  • @APIGroup Header
  • @APIuse API_VERSION
  • @apiDescription The description
    */`

Information

  • Version of apidoc: 0.54.0
  • Operating system: Windows
  • Node version: 18.14.2
  • Browser: Microsoft Edge
@SchoppAx
Copy link
Contributor

SchoppAx commented Mar 8, 2023

In my opinion, you can't use apiDefine to set the version of a documentation block.
The docu says:

Version can also be used in @apiDefine.

To define an inherit block, use apiDefine.
to reference a block, use apiUse. apiGroup and apiPermission are use commands to, but in their context the not inherit parameters, only title and description (in combination with apiVersion).

But this only says that you can have one apiDefine unique name for different versions.
For example:

// ------------------------------------------------------------------------------------------
// Current Permissions.
// ------------------------------------------------------------------------------------------
/**
 * @apiDefine admin Admin access rights needed.
 * Optionally you can write here further Informations about the permission.
 *
 * An "apiDefinePermission"-block can have an "apiVersion", so you can attach the block to a specific version.
 *
 * @apiVersion 0.3.0
 */

// ------------------------------------------------------------------------------------------
// History.
// ------------------------------------------------------------------------------------------
/**
 * @apiDefine admin This title is visible in version 0.1.0 and 0.2.0
 * @apiVersion 0.1.0
 */

Feature request?

@Stimm4
Copy link
Author

Stimm4 commented Apr 5, 2023

Thank you,
I think that a feature that allows to assign the last version by default to all the documentation, when updating the version name can be very interesting, because when developing a new version of a software, not all the documentation has changed and for most of those functions that have not changed between the two versions, we would like not to have to copy and paste the documentation block to have the version number updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants