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

Enhance API docs with information about results of code generation with generateFromString using entrypoint #507

Open
derberg opened this issue Feb 10, 2021 · 28 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@derberg
Copy link
Member

derberg commented Feb 10, 2021

Reason/Context

The problem is described here asyncapi-archived-repos/playground#79. It must be clear that returned data is not content but an object with content and metadata + what is this metadata, and that it is only with React renderer.

Description

Probably JSDoc must be only updated. Of course, some additional section in the readme would be also welcomed 😄

@derberg derberg added the enhancement New feature or request label Feb 10, 2021
@jonaslagoni
Copy link
Member

Quick note it might actually not be a feature but a bug. Think the generateFromString should always return the content as is regardless of whether it is a Nunjucks or React template.

If it is the case remember to change the playground afterwards.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Apr 12, 2021
@derberg derberg removed the stale label Apr 12, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Aug 14, 2021
@derberg derberg added good first issue Good for newcomers and removed stale labels Aug 16, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Dec 15, 2021
@derberg derberg removed the stale label Dec 15, 2021
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Apr 15, 2022
@derberg derberg removed the stale label Apr 20, 2022
@derberg
Copy link
Member Author

derberg commented Apr 20, 2022

it is still valid, not JSDoc fix but bug fix but still easy to do.
No need to followup with playground as it is not used anymore

@starlightknown
Copy link

Hi, I would like to take on this issue. A little guidance might be needed, I saw the playground PR and got some context.

@derberg
Copy link
Member Author

derberg commented May 9, 2022

I think it would be enough to just extend JSDoc of this function and explain that if entrypoint option is passed then the following object is returned => https://github.com/asyncapi/generator-react-sdk/blob/master/src/renderer/template.ts#L80

@magicmatatjahu @jonaslagoni thoughts?

@starlightknown did you edit JSDoc before? do you need support in explaining how to make changes locally and test if they work as expected?

@starlightknown
Copy link

starlightknown commented May 9, 2022

No, I haven't done it before and yes I'll need some help please

@derberg
Copy link
Member Author

derberg commented May 10, 2022

@starlightknown happy to help, no worries. Let's just make sure folks @magicmatatjahu @jonaslagoni agree with the fix that needs to be applied

@jonaslagoni
Copy link
Member

Sounds good to me 👍

@derberg
Copy link
Member Author

derberg commented Jul 25, 2022

@starlightknown looks like this one is ready to go, still interested?

@lumenCodes
Copy link

Hello @derberg please I want to tweet about this issue so first-time contributors can check it out.

@derberg
Copy link
Member Author

derberg commented Sep 26, 2022

@lumenCodes feel free 👍🏼

@lumenCodes
Copy link

Done

@Jagrutiti
Copy link

Hey,

Is this still issue open to work?

There are discussions. But no PRs.

@Jagrutiti
Copy link

In the description it is written:

Probably JSDoc must be only updated

Could you share the link of JSDoc?

@derberg
Copy link
Member Author

derberg commented Nov 15, 2022

@Jagrutiti hey, this is still valid.
JSDoc is part of the code, and then API.md file is generated from it.

This is a return definition that needs to be more specific -> https://github.com/asyncapi/generator/blob/master/lib/generator.js#L256. and https://github.com/asyncapi/generator/blob/master/lib/generator.js#L164

so basically in case entrypoint is used and output flag is set to string then generator instead of generating folders and files on a drive, it returns object like -> https://github.com/asyncapi/generator-react-sdk/blob/master/src/renderer/template.ts#L80 so generation result must be extracted from content property.

I personally do not know how to best do it with JSDoc, you need to have a look at their docs.
It might be something like @return {Promise<TemplateRenderResult|undefined>} with some additional explanation. But TemplateRenderResult type would have to be there too:

    /**
     * @typedef TemplateRenderMetadata
     * @type {object}
     * @property {string} fileName
     * @property {string} permissions
     */

    /**
     * @typedef TemplateRenderResult
     * @type {object}
     * @property {string} content
     * @property {TemplateRenderMetadata} metadata
     */

@jonaslagoni any better suggestions?

@jonaslagoni
Copy link
Member

Not really unless we want to convert the entire project into typescript 😄 So sounds good 👍

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@chinma-yyy
Copy link

Hey @derberg Could you once review the PR?

@github-actions github-actions bot removed the stale label May 26, 2023
@derberg
Copy link
Member Author

derberg commented Jun 21, 2023

unless we want to convert the entire project into typescript

burn 😛

Could you once review the PR?

on it, sorry for delay 🙏🏼

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Oct 20, 2023
@derberg derberg removed the stale label Nov 28, 2023
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Mar 28, 2024
@lmgyuan
Copy link
Collaborator

lmgyuan commented Mar 28, 2024

Can I take on this issue?

@github-actions github-actions bot removed the stale label Mar 29, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jul 27, 2024
@derberg
Copy link
Member Author

derberg commented Aug 1, 2024

@lmgyuan you can take up this one if you want

@github-actions github-actions bot removed the stale label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
8 participants