Add support for YAML configuration file format#1682
Add support for YAML configuration file format#1682YangSiJun528 wants to merge 17 commits intospring-io:mainfrom
Conversation
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
All tests passed up to the initializr-generator-spring module. Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
…module Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
036366a to
91c2853
Compare
|
Thanks @YangSiJun528, I'm going to take a look. I'm in the middle of something right now, but i plan to look at it this week. |
| } | ||
| ] | ||
| }, | ||
| "configurationFileFormat": { |
There was a problem hiding this comment.
This changes the metadata v2.0.0 format. I think we should add a new metadata version v2.3 which adds the configurationFileFormat field. You can take a look at InitializrMetadataV22JsonMapper and InitializrMetadataV21JsonMapper for that.
There was a problem hiding this comment.
I reverted the changes to InitializrMetadataV2JsonMapper and added InitializrMetadataV23JsonMapper.
|
Hi @YangSiJun528 , thanks for the PR. I've left some comments for your consideration. I think your name |
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
Signed-off-by: sijun-yang <[email protected]>
This reverts commit 19c8659. Signed-off-by: sijun-yang <[email protected]>
095a000 to
c33b851
Compare
|
Applied feedback to address metadata format compatibility issues. configuration file format addition changes the metadata structure, requiring format versioning:
This maintains v2.0 compatibility while enabling configuration file format features in v2.3. |
Signed-off-by: sijun-yang <[email protected]>
|
And I have added compliance tests to This PR should now be ready for review. @mhalbritter |
See gh-1682 Signed-off-by: sijun-yang <[email protected]>
|
Thanks @YangSiJun528 ! I've polished a bit, for example the created file is now named Users who upgrade to initializr 0.23.0 will have to update their application configuration, with something like this: configuration-file-formats:
- name: Properties
id: properties
default: true
- name: YAML
id: yaml
default: false |
|
Thanks for making this change! I initially used After looking into it, I learned Just leaving a note in case anyone wonders why |
The ConfigurationFileFormat introduced in spring-iogh-1682 is not handled in the MutableProjectDescription copy constructor or in ProjectDescriptionDiff. This commit adds the missing logic and corresponding tests. Signed-off-by: sijun-yang <[email protected]>
The ConfigurationFileFormat introduced in spring-iogh-1682 is not handled in the MutableProjectDescription copy constructor or in ProjectDescriptionDiff. This commit adds the missing logic and corresponding tests. Signed-off-by: sijun-yang <[email protected]>
The ConfigurationFileFormat introduced in gh-1682 is not handled in the MutableProjectDescription copy constructor or in ProjectDescriptionDiff. This commit adds the missing logic and corresponding tests. See gh-1693 Signed-off-by: sijun-yang <[email protected]>
This PR adds an option to generate project configuration in YAML format. Currently, only
.propertiesis supported. (#1109)This PR has many changes, so I'm opening this PR early to get feedback before completing all implementation details. The core features work well, but I still need to add more comprehensive tests - currently only basic tests are implemented.
Main Changes
ConfigurationFileFormatinterface with factory and implementations for Properties and YAMLApplicationPropertiesto write YAML formatApplicationYamlPropertiesContributor@ConditionalOnConfigurationFileFormatandOnConfigurationFileFormatConditionto choose between Properties and YAMLMutableProjectDescription,InitializrMetadata, andProjectRequestapplication.propertiesvalidation or set format explicitly where needed.Need Feedback On
ConfigurationFileFormatappropriate? (io.spring.initializr.generator.configuration.format)Once I receive feedback on the approach, I will add comprehensive tests and polish the implementation before requesting final review.
Fixes gh-1109