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

Add type and possibleValues properties to template configuration #414

Closed
derberg opened this issue Sep 14, 2020 · 16 comments
Closed

Add type and possibleValues properties to template configuration #414

derberg opened this issue Sep 14, 2020 · 16 comments
Labels
enhancement New feature or request stale

Comments

@derberg
Copy link
Member

derberg commented Sep 14, 2020

Reason/Context

I have a template where user can pass -p png=true to get additional png of the diagram. I showed example through CLI where everything is a String. Now, in configuration we do not specify type of the value that has to be provided in the parameter. I can do it in readme but yeah, manual and depends on my. Now, I wanted to use my template in Generator as library and I immediately did:

const generator = new Generator(path.resolve(__dirname, '../../'), outputDir, { 
    forceWrite: true,
    templateParams: {
      png: true
    }
  });```

So I passed Boolean, as this was natural for me.

Description

We should introduce new properties to Generator configuration in parameters section:

  • type to clearly specify what data type is of a given parameter so we can also validate if good data is passed, and what to do with it when it comes from CLI
  • enum or possibleValues where we can specify what values are expected on a given parameter.

Thanks to above we not only can nicely validate the input but also have a tool that generates parameters documentaiton in the template readme

@derberg derberg added the enhancement New feature or request label Sep 14, 2020
@derberg
Copy link
Member Author

derberg commented Sep 16, 2020

wouldn't instead of those 2 fields be better to specify just a schema with JSON Schema format 🤔

@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 30 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 Nov 16, 2020
@derberg derberg removed the stale label Nov 16, 2020
@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 Jan 16, 2021
@derberg derberg removed the stale label Jan 18, 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 github-actions bot added the stale label Mar 20, 2021
@derberg derberg removed the stale label Mar 22, 2021
@magicmatatjahu
Copy link
Member

Maybe we should switch to JSON Schema for validation? 🤔

@derberg
Copy link
Member Author

derberg commented Apr 21, 2021

yup #414 (comment) might be the case here

@magicmatatjahu
Copy link
Member

Ahh sorry 😅 I didn't see it.

@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 21, 2021
@derberg derberg removed the stale label Aug 23, 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 22, 2021
@derberg derberg removed the stale label Dec 22, 2021
@derberg
Copy link
Member Author

derberg commented Dec 22, 2021

still good to have

@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 22, 2022
@derberg derberg removed the stale label Apr 26, 2022
@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 stale and removed stale labels Aug 25, 2022
@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 25, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
@derberg derberg removed the stale label Jul 5, 2023
@derberg derberg reopened this Jul 5, 2023
Copy link
Contributor

github-actions bot commented Nov 3, 2023

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 Nov 3, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2024
@AnimeshKumar923
Copy link
Contributor

@derberg is this issue still valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

3 participants