-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add YAML support for 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
base: main
Are you sure you want to change the base?
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. |
...st/java/io/spring/initializr/web/controller/ProjectGenerationControllerIntegrationTests.java
Outdated
Show resolved
Hide resolved
@@ -149,6 +149,20 @@ | |||
} | |||
] | |||
}, | |||
"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 <[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 |
This PR adds an option to generate project configuration in YAML format. Currently, only
.properties
is 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
ConfigurationFileFormat
interface with factory and implementations for Properties and YAMLApplicationProperties
to write YAML formatApplicationYamlPropertiesContributor
@ConditionalOnConfigurationFileFormat
andOnConfigurationFileFormatCondition
to choose between Properties and YAMLMutableProjectDescription
,InitializrMetadata
, andProjectRequest
application.properties
validation or set format explicitly where needed.Need Feedback On
ConfigurationFileFormat
appropriate? (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