Skip to content

Commit 423b0c4

Browse files
YangSiJun528mhalbritter
authored andcommitted
Document configuration file format v2.3 in metadata
See gh-1697 Signed-off-by: sijun-yang <yangsijun5528@gmail.com>
1 parent bb2c5f4 commit 423b0c4

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

initializr-docs/src/main/asciidoc/configuration-guide.adoc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ generate assets based on available candidates.
5353
A project is defined by `ProjectDescription` which consists of the following properties:
5454

5555
* Basic coordinates such as `groupId`, `artifactId`, `name`, `description`
56-
* The `BuildSystem` and `Packaging`
56+
* The `BuildSystem`, `Packaging` and `ConfigurationFileFormat`
5757
* The JVM `Language`
5858
* The requested dependencies, indexed by ID
5959
* A platform `Version` used by the project. This can be used to tune available
@@ -341,6 +341,25 @@ NOTE: `Jar` and `War` packaging types are available out-of-the-box. For addition
341341
packaging formats, you need to implement the `Packaging` abstraction and provide a
342342
`PackagingFactory` that corresponds to it.
343343

344+
Configuration file formats are configurable in the same way as above:
345+
346+
[source,yaml,indent=0]
347+
----
348+
initializr:
349+
configuration-file-formats:
350+
- name: Properties
351+
id: properties
352+
default: true
353+
- name: YAML
354+
id: yaml
355+
default: false
356+
----
357+
358+
NOTE: `Properties` and `YAML` configuration file formats are supported out-of-the-box.
359+
If you need to support additional configuration formats, you must implement the
360+
`ConfigurationFileFormat` abstraction and provide a `ConfigurationFileFormatFactory` that can
361+
generate it.
362+
344363

345364

346365
[[create-instance-text-only-settings]]

initializr-docs/src/main/asciidoc/metadata-format.adoc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ sent to the service. A good structure for a user agent is `clientId/clientVersio
1414
== Service Capabilities
1515
Any third party client can retrieve the capabilities of the service by issuing a
1616
`GET` on the root URL using the following `Accept` header:
17-
`application/vnd.initializr.v2.2+json`. Please note that the metadata may evolve in a
17+
`application/vnd.initializr.v2.3+json`. Please note that the metadata may evolve in a
1818
non backward compatible way in the future so adding this header ensures the service
1919
returns the metadata format you expect.
2020

2121
The following versions are supported:
2222

2323
* `v2` initial version, with support of V1 version format only
2424
* `v2.1` support compatibility range and dependencies links
25-
* `v2.2` (current) support for V1 and V2 version formats.
25+
* `v2.2` support for V1 and V2 version formats.
26+
* `v2.3` (current) support for selecting the configuration file format.
2627

2728
This is an example output for a service running at `start.example.com`:
2829

@@ -45,6 +46,8 @@ component responsible to generate the project (for instance, generate an executa
4546
_jar_ project).
4647
* Java version: the supported java versions
4748
* Language: the language to use (e.g. Java)
49+
* Configuration file format: the supported configuration formats for the generated
50+
project (e.g. `application.properties`, `application.yml`)
4851
* Boot version: the platform version to use
4952
* Additional basic information such as: `groupId`, `artifactId`, `version`, `name`,
5053
`description` and `packageName`.
@@ -168,6 +171,14 @@ include::{snippets}/metadataWithCurrentAcceptHeader/response-fields/language.val
168171

169172

170173

174+
=== Configuration file format
175+
The `configurationFileFormat` element provides a list of possible configuration file formats for the project:
176+
177+
.Configuration file format example
178+
include::{snippets}/metadataWithCurrentAcceptHeader/response-fields/configurationFileFormat.values.0.adoc[]
179+
180+
181+
171182
=== Platform versions
172183
The `bootVersion` element provides the list of available platform versions
173184

0 commit comments

Comments
 (0)