mirror of
https://gitee.com/dcren/initializr.git
synced 2026-02-26 05:32:58 +08:00
Serve version format that is backward compatible
This commit makes sure the metadata format uses a backward compatible version format even if the new format is used. It also introduces a new metadata version (2.2) that can be used by clients that support the new version format. See gh-1092
This commit is contained in:
@@ -13,10 +13,16 @@ sent to the service. A good structure for a user agent is `clientId/clientVersio
|
||||
== 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
|
||||
`application/vnd.initializr.v2.2+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.
|
||||
|
||||
The following versions are supported:
|
||||
|
||||
* `v2` initial version, with support of V1 version format only
|
||||
* `v2.1` support compatibility range and dependencies links
|
||||
* `v2.2` (current) support for V1 and V2 version formats.
|
||||
|
||||
This is an example output for a service running at `https://start.spring.io`:
|
||||
|
||||
.request
|
||||
|
||||
@@ -110,7 +110,7 @@ include::{test-examples}/stub/ClientApplicationTests.java[tag=test]
|
||||
|
||||
Then you have a server that returns the stub of the JSON metadata
|
||||
(`metadataWithCurrentAcceptHeader.json`) when you send it a header
|
||||
`Accept:application/vnd.initializr.v2.1+json` (as recommended).
|
||||
`Accept:application/vnd.initializr.v2.2+json` (as recommended).
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user