-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
webapp/src/main/java/com/manorrock/toyger/webapp/ApiVersionCheckResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.manorrock.toyger.webapp; | ||
|
||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.core.Response; | ||
|
||
/** | ||
* The API version checkout. | ||
* | ||
* @see https://distribution.github.io/distribution/spec/api/#api-version-check | ||
* @author MAnfred Riem ([email protected]) | ||
*/ | ||
@Path("v2") | ||
public class ApiVersionCheckResource { | ||
|
||
/** | ||
* Return status 200 with header | ||
* 'Docker-Distribution-API-Version: registry/2.0'. | ||
* | ||
* @return the response. | ||
*/ | ||
@GET | ||
public Response apiVersionCheck() { | ||
return Response | ||
.ok() | ||
.header("Docker-Distribution-API-Version", "registry/2.0") | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters