Skip to content
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

Fixes #131 - Add API version check #132

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Configures Jakarta RESTful Web Services for the application.
* @author Juneau
*/
@ApplicationPath("resources")
@ApplicationPath("")
public class JakartaRestConfiguration extends Application {

}