Skip to content

Commit

Permalink
Move alias to routes and make options model public
Browse files Browse the repository at this point in the history
  • Loading branch information
skapur12 committed Feb 26, 2025
1 parent 526ef7a commit 35f3901
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 4 additions & 6 deletions specification/batch/Azure.Batch/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ interface BatchClient {

/* JAVA OVERRIDES */
// Options Bag Overrides
alias GetApplicationRequiredParameter = {
@doc("The ID of the Application")
@path
applicationId: string;
};

@doc("Optional parameters for Get Application operation.")
model GetApplicationOptions {
Expand All @@ -125,7 +120,7 @@ model GetApplicationOptions {
#suppress "@azure-tools/typespec-azure-core/use-standard-operations" ""
@doc("Custom override for Get Application operation.")
op getApplicationCustomization(
...GetApplicationRequiredParameter,
...Azure.Batch.GetApplicationRequiredParameters,

@doc("Optional parameters for Get Application operation.")
options?: GetApplicationOptions,
Expand Down Expand Up @@ -303,6 +298,9 @@ op getApplicationCustomization(
"java"
);

//Options Bag Overrides
@@access(GetApplicationOptions, Access.public, "java");

// model overrides
@@access(Azure.Batch.BatchApplicationListResult, Access.public, "java");
@@access(Azure.Batch.BatchApplication, Access.public, "java");
Expand Down
10 changes: 9 additions & 1 deletion specification/batch/Azure.Batch/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ using Azure.ClientGenerator.Core;

namespace Azure.Batch;

//Aliases

alias GetApplicationRequiredParameters = {
@doc("The ID of the Application")
@path
applicationId: string;
};

// Interfaces ////////////////////

#suppress "@azure-tools/typespec-azure-core/no-rpc-path-params" ""
Expand Down Expand Up @@ -44,7 +52,7 @@ interface Applications {
@route("/applications/{applicationId}")
getApplication is ReadOperation<
{
...Client.GetApplicationRequiredParameter;
...Azure.Batch.GetApplicationRequiredParameters;
},
BatchApplication
>;
Expand Down

0 comments on commit 35f3901

Please sign in to comment.