File tree Expand file tree Collapse file tree
specification/ai-foundry/data-plane/Foundry
sdk-python-js-azure-ai-projects Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,3 +30,4 @@ import "./src/toolboxes/routes.tsp";
3030import "./src/data_generation_jobs/routes.tsp" ;
3131import "./src/agents-optimization/routes.tsp" ;
3232import "./tag-definitions.tsp" ;
33+ import "./src/error.range.tsp" ;
Original file line number Diff line number Diff line change 1+ /** Error response for Azure range errors. */
2+ alias AzureRangeErrorResponse <ErrorResponseParameter = Azure .Core .Foundations .ErrorResponse > = ErrorResponseParameter ;
Original file line number Diff line number Diff line change 1+ import "@typespec/http" ;
2+
3+ using TypeSpec .Http ;
4+
5+ /** Error response for Azure range errors. */
6+ alias AzureRangeErrorResponse <ErrorResponseParameter = Azure .Core .Foundations .ErrorResponse > =
7+ | {
8+ ... ErrorResponseParameter ;
9+
10+ @ maxValue (499 )
11+ @ minValue (400 )
12+ @ statusCode
13+ statusCode : int32 ;
14+ }
15+ | {
16+ ... ErrorResponseParameter ;
17+
18+ @ maxValue (599 )
19+ @ minValue (500 )
20+ @ statusCode
21+ statusCode : int32 ;
22+ };
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import "../agents-optimization/routes.tsp";
3232// Create a ".beta" subclient for the above beta operations
3333import "../sdk-common/beta-ops-relocation-agents.tsp" ;
3434import "../sdk-common/beta-ops-relocation-projects.tsp" ;
35+ import "../error.default.tsp" ;
3536
3637using Azure .ClientGenerator .Core ;
3738using Azure .AI .Projects ;
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ options:
5151 - specification/ai-foundry/data-plane/Foundry/src/skills
5252 - specification/ai-foundry/data-plane/Foundry/src/toolboxes
5353 - specification/ai-foundry/data-plane/Foundry/src/tools
54+ - specification/ai-foundry/data-plane/Foundry/src/error.default.tsp
5455imports :
5556 - " @azure-tools/typespec-azure-core"
5657 - " @azure-tools/typespec-azure-core/experimental"
@@ -76,3 +77,4 @@ linter:
7677 " @azure-tools/typespec-azure-core/no-query-explode " : " Explode is used in OpenAI package."
7778 " @azure-tools/typespec-client-generator-core/property-name-conflict " : " OpenAI package has conflict."
7879 " @azure-tools/typespec-azure-core/no-enum " : " OpenAI uses enums."
80+ " @azure-tools/typespec-azure-core/no-error-status-codes " : " Azure REST API guidelines recommend using 'default' error response for all error cases. Avoid defining custom 4xx or 5xx error cases."
Original file line number Diff line number Diff line change @@ -16,25 +16,6 @@ alias FoundryDataPlaneApiVersionParameter = {
1616 apiVersion : string ;
1717};
1818
19- /** Error response for Azure range errors. */
20- alias AzureRangeErrorResponse <ErrorResponseParameter = Azure .Core .Foundations .ErrorResponse > =
21- | {
22- ... ErrorResponseParameter ;
23-
24- @ maxValue (499 )
25- @ minValue (400 )
26- @ statusCode
27- statusCode : int32 ;
28- }
29- | {
30- ... ErrorResponseParameter ;
31-
32- @ maxValue (599 )
33- @ minValue (500 )
34- @ statusCode
35- statusCode : int32 ;
36- };
37-
3819alias FoundryDataPlaneAzureTraits = Azure .Core .Traits .SupportsClientRequestId &
3920 Azure .Core .Traits .NoRepeatableRequests &
4021 Azure .Core .Traits .NoConditionalRequests &
You can’t perform that action at this time.
0 commit comments