Skip to content
Open
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
6 changes: 4 additions & 2 deletions specification/containerservice/Fleet.Management/fleet.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.ResourceManager;
using Azure.Core;
using Azure.Core.Traits;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;
Expand Down Expand Up @@ -258,7 +257,10 @@ interface Fleets {
listByResourceGroup is ArmResourceListByParent<Fleet>;

@doc("Lists fleets in the specified subscription.")
listBySubscription is ArmListBySubscription<Fleet>;
listBySubscription is ArmListBySubscription<
Fleet,
Parameters = TopQueryParameter & SkipTokenQueryParameter
>;

@doc("Lists the user credentials of a Fleet.")
listCredentials is ArmResourceActionSync<Fleet, void, FleetCredentialResults>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,10 @@ interface FleetMembers {
>;

/** List FleetMember resources by Fleet */
listByFleet is ArmResourceListByParent<FleetMember>;
listByFleet is ArmResourceListByParent<
FleetMember,
Parameters = TopQueryParameter &
SkipTokenQueryParameter &
FilterQueryParameter
>;
}
8 changes: 6 additions & 2 deletions specification/containerservice/Fleet.Management/gate.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down Expand Up @@ -196,5 +195,10 @@ interface Gates {
IfNoneMatchParameters<Gate>
>;

listByFleet is ArmResourceListByParent<Gate>;
listByFleet is ArmResourceListByParent<
Gate,
Parameters = FilterQueryParameter &
TopQueryParameter &
SkipTokenQueryParameter
>;
}
22 changes: 21 additions & 1 deletion specification/containerservice/Fleet.Management/helpers.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@typespec/rest";
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;

Expand All @@ -27,6 +26,27 @@ alias IfMatchHeadersParameters<T extends Azure.ResourceManager.Foundations.Resou
...IfNoneMatchParameters<T>;
};

@doc("Provides the standard '$skiptoken' query parameter for list operations.")
model SkipTokenQueryParameter {
@query("$skipToken")
@doc("The page-continuation token to use with a paged version of this API.")
skipToken?: string;
}

@doc("Provides the standard '$top' query parameter for list operations.")
model TopQueryParameter {
@query("$top")
@doc("The number of result items to return.")
top?: int32;
}

@doc("Provides the standard '$filter' query parameter for list operations.")
model FilterQueryParameter {
@query("$filter")
@doc("Filter the result list using the given expression.")
filter?: string;
}

#suppress "@azure-tools/cadl-azure-resource-manager/arm-resource-operation-outside-interface" "this is a template"
@autoRoute
@doc("Update a {name}", TResource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ using TypeSpec.Versioning;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
using Azure.Core;
using Azure.Core.Traits;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down Expand Up @@ -153,7 +151,10 @@ interface AutoUpgradeProfiles {
BaseParameters<AutoUpgradeProfile> & IfMatchParameters<AutoUpgradeProfile>
>;

listByFleet is ArmResourceListByParent<AutoUpgradeProfile>;
listByFleet is ArmResourceListByParent<
AutoUpgradeProfile,
Parameters = TopQueryParameter & SkipTokenQueryParameter
>;
}

@doc("AutoUpgradeProfileStatus is the status of an auto upgrade profile.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.ResourceManager;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;

Expand Down Expand Up @@ -426,7 +425,10 @@ interface UpdateRuns {
>;

/** List UpdateRun resources by Fleet */
listByFleet is ArmResourceListByParent<UpdateRun>;
listByFleet is ArmResourceListByParent<
UpdateRun,
Parameters = TopQueryParameter & SkipTokenQueryParameter
>;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "Existing API"
@doc("Starts an UpdateRun.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.ResourceManager;
using Azure.Core;
using Azure.Core.Traits;
using TypeSpec.OpenAPI;

namespace Microsoft.ContainerService;
Expand Down Expand Up @@ -79,5 +77,8 @@ interface FleetUpdateStrategies {
>;

/** List FleetUpdateStrategy resources by Fleet */
listByFleet is ArmResourceListByParent<FleetUpdateStrategy>;
listByFleet is ArmResourceListByParent<
FleetUpdateStrategy,
Parameters = TopQueryParameter & SkipTokenQueryParameter
>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
},
{
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -517,6 +523,15 @@
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
},
{
"$ref": "#/parameters/FilterQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -1092,5 +1107,34 @@
"readOnly": true
}
},
"parameters": {}
"parameters": {
"FilterQueryParameter": {
"name": "$filter",
"in": "query",
"description": "Filter the result list using the given expression.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "filter"
},
"SkipTokenQueryParameter": {
"name": "$skipToken",
"in": "query",
"description": "The page-continuation token to use with a paged version of this API.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "skipToken"
},
"TopQueryParameter": {
"name": "$top",
"in": "query",
"description": "The number of result items to return.",
"required": false,
"type": "integer",
"format": "int32",
"x-ms-parameter-location": "method",
"x-ms-client-name": "top"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
},
{
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -520,6 +526,15 @@
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
},
{
"$ref": "#/parameters/FilterQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -887,6 +902,12 @@
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -2092,5 +2113,34 @@
}
}
},
"parameters": {}
"parameters": {
"FilterQueryParameter": {
"name": "$filter",
"in": "query",
"description": "Filter the result list using the given expression.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "filter"
},
"SkipTokenQueryParameter": {
"name": "$skipToken",
"in": "query",
"description": "The page-continuation token to use with a paged version of this API.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "skipToken"
},
"TopQueryParameter": {
"name": "$top",
"in": "query",
"description": "The number of result items to return.",
"required": false,
"type": "integer",
"format": "int32",
"x-ms-parameter-location": "method",
"x-ms-client-name": "top"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@
},
{
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -538,6 +544,15 @@
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
},
{
"$ref": "#/parameters/FilterQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -923,6 +938,12 @@
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
{
"$ref": "#/parameters/TopQueryParameter"
},
{
"$ref": "#/parameters/SkipTokenQueryParameter"
}
],
"responses": {
Expand Down Expand Up @@ -2301,5 +2322,34 @@
}
}
},
"parameters": {}
"parameters": {
"FilterQueryParameter": {
"name": "$filter",
"in": "query",
"description": "Filter the result list using the given expression.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "filter"
},
"SkipTokenQueryParameter": {
"name": "$skipToken",
"in": "query",
"description": "The page-continuation token to use with a paged version of this API.",
"required": false,
"type": "string",
"x-ms-parameter-location": "method",
"x-ms-client-name": "skipToken"
},
"TopQueryParameter": {
"name": "$top",
"in": "query",
"description": "The number of result items to return.",
"required": false,
"type": "integer",
"format": "int32",
"x-ms-parameter-location": "method",
"x-ms-client-name": "top"
}
}
}
Loading
Loading