Skip to content

Base codestarts should allow to generate yaml files instead of yml #43218

Open

Description

Description

when we create new applications from code.quarkus.io or quarkus create app, and we choose extension config-yaml, thi will generate configuration files with extension yml. despite supporting both extensions yaml and yml, it seems that quarkus has a slight preference for suffix yaml: in https://quarkus.io/guides/config-yaml .yaml appears 12 times, and .yml only once (in this sentence: Quarkus recognizes both .yml and .yaml file extensions).
the suffix being used could be changed to yaml to be more consistent with the documentation, or at least this would be nice to specify the suffix we want to use as a parameter.

cc @ia3andy @aloubyansky

Implementation ideas

@ia3andy has suggested several elements in this zulip conversation:

for the yml -> yaml you could introduce a new config and use it in the smart-config-merge, the codestart would still use yml, but the output will use what's set in the config
FYI the config data is available in the strategy
to read the data you need to use NestedMaps.getValue(
I see there is already a file-name: application.yml but I don't see where it's used
ah for now it's used in the readme
you can use this in the SmartConfigMerge to also configure the target file at generation
to read the value NestedMaps.getValue(data, "config.file-name")
you should be able to have the same include template for test and compile deps
just pass another arg

ideally, we would support a parameter that we could pass as: --data=yaml-suffix=yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions