<commit_before>[[metadata-format]]
= Metadata Format
This section describes the hal/json structure of the metadata exposed by the
initializr. Such metadata can be used by third party clients to provide a list of
options and default settings that can be used to request the creation of a project.

A third-party client is advised to set a `User-Agent` header for *each* request
sent to the service. A good structure for a user agent is `clientId/clientVersion`
(i.e. `foo/1.2.0` for the "foo" client and version `1.2.0`).



== Content
Any third party client can retrieve the capabilities of the service by issuing a
`GET` on the root URL using the following `Accept` header:
`application/vnd.initializr.v2.1+json`. Please note that the metadata may evolve in a
non backward compatible way in the future so adding this header ensures the service
returns the metadata format you expect.

This is an example output for a service running at `https://start.spring.io`:

.request
include::{snippets}/metadataWithCurrentAcceptHeader/http-request.adoc[]

.response
include::{snippets}/metadataWithCurrentAcceptHeader/http-response.adoc[]

The current capabilities are the following:

* Project dependencies: these are the _starters_ really or actually any dependency
that we might want to add to the project.
* Project types: these define the action that can be invoked on this service and a
description of what it would produce (for instance a zip holding a pre-configured
Maven project). Each type may have one more tags that further define what it
generates.
* Packaging: the kind of projects to generate. This merely gives a hint to the
component responsible to generate the project (for instance, generate an executable
_jar_ project).
* Java version: the supported java versions
* Language: the language to use (e.g. Java)<commit_msg>Rename section that uses a well-known name<commit_after>[[metadata-format]]
= Metadata Format
This section describes the hal/json structure of the metadata exposed by the
initializr. Such metadata can be used by third party clients to provide a list of
options and default settings that can be used to request the creation of a project.

A third-party client is advised to set a `User-Agent` header for *each* request
sent to the service. A good structure for a user agent is `clientId/clientVersion`
(i.e. `foo/1.2.0` for the "foo" client and version `1.2.0`).



== Service Capabilities
Any third party client can retrieve the capabilities of the service by issuing a
`GET` on the root URL using the following `Accept` header:
`application/vnd.initializr.v2.1+json`. Please note that the metadata may evolve in a
non backward compatible way in the future so adding this header ensures the service
returns the metadata format you expect.

This is an example output for a service running at `https://start.spring.io`:

.request
include::{snippets}/metadataWithCurrentAcceptHeader/http-request.adoc[]

.response
include::{snippets}/metadataWithCurrentAcceptHeader/http-response.adoc[]

The current capabilities are the following:

* Project dependencies: these are the _starters_ really or actually any dependency
that we might want to add to the project.
* Project types: these define the action that can be invoked on this service and a
description of what it would produce (for instance a zip holding a pre-configured
Maven project). Each type may have one more tags that further define what it
generates.
* Packaging: the kind of projects to generate. This merely gives a hint to the
component responsible to generate the project (for instance, generate an executable
_jar_ project).
* Java version: the supported java versions
* Language: the language to use (e.g. Java)
{'fraction_non_alphanumeric': 0.05963302752293578, 'fraction_numerical': 0.004317323259579061, 'mean_word_length': 4.747286821705426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7585594', 'n_tokens_mistral': 936, 'n_tokens_neox': 916, 'n_words': 524}