Skip to content

Commit

Permalink
added route doc
Browse files Browse the repository at this point in the history
Signed-off-by: munishchouhan <hrma017@gmail.com>
  • Loading branch information
munishchouhan committed Feb 24, 2025
1 parent a507d54 commit a447d8f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions typespec/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ namespace wave {
@route("/v1alpha2/container")
interface ContainerService {

@doc("This endpoint allows you to submit a request to access a private container registry via Wave, or build a container image on-the-fly with a Dockerfile or Conda recipe file and returns the name of the container request made available by Wave.")
@post op createContainer(@body requestBody: ContainerRequest): {
@body response: ContainerResponse;
@statusCode statusCode: 200;
};

@route("/{requestId}")
@doc("This endpoint allows you to get the details of a container request made to Wave.")
@get op getContainerDetails(@path requestId: string): {
@body response: WaveContainerRecord;
@statusCode statusCode: 200;
Expand All @@ -29,6 +31,7 @@ namespace wave {
};

@route("/{requestId}/status")
@doc("This endpoint allows you to get the status of a container request made to Wave.")
@get op getContainerStatus(@path requestId: string): {
@body response: ContainerStatusResponse;
@statusCode statusCode: 200;
Expand All @@ -40,6 +43,7 @@ namespace wave {
@route("/v1alpha1/builds/{buildId}")
interface BuildService {

@doc("Provides status of build against buildId passed as path variable.")
@get op getBuildRecord(@path buildId: string): {
@body response: WaveBuildRecord;
@statusCode statusCode: 200;
Expand All @@ -48,6 +52,7 @@ namespace wave {
};

@route("/status")
@doc("Provides status of build against buildId passed as path variable.")
@get op getBuildStatus(@path buildId: string): {
@body response: BuildStatusResponse;
@statusCode statusCode: 200;
Expand All @@ -56,6 +61,7 @@ namespace wave {
};

@route("/logs")
@doc("Supply logs corresponding to the specified buildId within the API request.")
@get op getBuildLogs(@path buildId: string): {
@body response: string;
@statusCode statusCode: 200;
Expand All @@ -67,7 +73,7 @@ namespace wave {

@route("/v1alpha1/scans/{scanId}")
interface scanService{

@doc("This endpoint allows you to get the details of a container scan request made to Wave.")
@get op scanImage(@path scanId: string) : {
@body response: WaveScanRecord;
@statusCode statusCode: 200;
Expand All @@ -79,7 +85,7 @@ namespace wave {

@route("/v1alpha1/inspect")
interface InspectService {

@doc("This endpoint returns the metadata about provided container image.")
@post op inspectContainer(@body requestBody: ContainerInspectRequest): {
@body response: ContainerInspectResponse;
@statusCode statusCode: 200;
Expand All @@ -90,12 +96,14 @@ namespace wave {
}

@route("/v1alpha2/validate-creds")
@doc("This endpoint allows you to validate the credentials of a container registry.")
@post op validateCredsV2(@body request: ValidateRegistryCredsRequest): boolean;

@route("/v1alpha1/mirrors")
interface getMirrorRecord {

@route("/{mirrorId}")
@doc("This endpoint allows you to get the details of a container mirror request made to Wave.")
@get op containerMirror(@path mirrorId: string): {
@body response: ContainerMirrorResponse;
@statusCode statusCode: 200;
Expand Down

0 comments on commit a447d8f

Please sign in to comment.