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

Should offical presets should be added as include options? #1397

Closed
jonaslagoni opened this issue Jun 9, 2023 · 6 comments
Closed

Should offical presets should be added as include options? #1397

jonaslagoni opened this issue Jun 9, 2023 · 6 comments
Labels
enhancement New feature or request stale

Comments

@jonaslagoni
Copy link
Member

jonaslagoni commented Jun 9, 2023

Reason/Context

I am starting to be annoyed with having to do:

new TypeScriptFileGenerator({
    presets: [
      {
        preset: TS_COMMON_PRESET,
        options: {
          marshalling: true
        }
      }
    ]
  });

each time I want to include marshaling functions (general pain point across all presets and output languages, not specifically for TS ad marshalling).

I think it makes sense that we start to hide the underlying preset architecture, to improve the developer experience at least where possible. That would mean we reduce the code above to:

new TypeScriptFileGenerator({
    includeMarshalling: true
  });

What do you think? would that improve the overall experience? Or is it better to force the user to use presets and get familiar with them?

@jonaslagoni jonaslagoni added the enhancement New feature or request label Jun 9, 2023
@kaushik-rishi
Copy link
Contributor

Yes, it makes complete sense to hide the internal preset architecture.

@kaushik-rishi
Copy link
Contributor

kaushik-rishi commented Jun 15, 2023

Or is it better to force the user to use presets and get familiar with them?

In which case would the user benefit from doing so @jonaslagoni ? 🤔

@jonaslagoni
Copy link
Member Author

@kaushik-rishi because presets are such a central peace of functionality, hiding it away behind simple options means fewer people will know about it.

On the other side, it simplifies the UX a lot.

@rukundob451
Copy link
Contributor

@jonaslagoni @kaushik-rishi what about introducing a more concise syntax, such as includeMarshalling: true, can certainly enhance the overall experience for developers the complexity and allows developers to focus on the specific functionality they need without having to navigate preset configurations.

@jonaslagoni jonaslagoni changed the title Offical presets should be added as include options Should offical presets should be added as include options? Jun 24, 2023
@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 23, 2023
@jonaslagoni
Copy link
Member Author

Closing, as unless there is an overwhelming need for it to not add too many abstractions.

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