-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add support for YAML configuration file format #1682
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
Conversation
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
All tests passed up to the initializr-generator-spring module. Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
…module Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
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. |
...st/java/io/spring/initializr/web/controller/ProjectGenerationControllerIntegrationTests.java
Outdated
Show resolved
Hide resolved
| } | ||
| ] | ||
| }, | ||
| "configurationFileFormat": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
This reverts commit 19c8659. Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
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 <yangsijun5528@gmail.com>
|
And I have added compliance tests to This PR should now be ready for review. @mhalbritter |
See gh-1682 Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
|
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 <yangsijun5528@gmail.com>
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 <yangsijun5528@gmail.com>
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