Skip to content

Commit

Permalink
Merge pull request Azure#6 from kseager/fix_error_issue
Browse files Browse the repository at this point in the history
updates from removing error response
  • Loading branch information
diondrapeck authored May 21, 2024
2 parents c416b62 + acb09a4 commit 979bc2b
Show file tree
Hide file tree
Showing 15 changed files with 214 additions and 152 deletions.
12 changes: 6 additions & 6 deletions specification/machinelearningservices/AzureAI.Assets/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ interface Prompts {
@path
version: string;
},
Prompt | Foundations.ErrorResponse
Prompt
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
Expand All @@ -169,7 +169,7 @@ interface Prompts {
@body
body: Prompt;
},
ResourceCreatedOrOkResponse<Prompt> | Foundations.ErrorResponse
ResourceCreatedOrOkResponse<Prompt>
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Waiting for bug fix: https://github.com/Azure/typespec-azure-pr/issues/3739."
Expand Down Expand Up @@ -197,7 +197,7 @@ interface Prompts {

...StandardListQueryParameters;
},
PagedPrompt | Foundations.ErrorResponse
PagedPrompt
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Need to define route."
Expand All @@ -211,7 +211,7 @@ interface Prompts {
@path
name: string;
},
Prompt | Foundations.ErrorResponse
Prompt
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Need to define route."
Expand All @@ -225,7 +225,7 @@ interface Prompts {
@path
name: string;
},
VersionInfo | Foundations.ErrorResponse
VersionInfo
>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Need to define route."
Expand All @@ -236,6 +236,6 @@ interface Prompts {
{
...StandardListQueryParameters;
},
PagedPrompt | Foundations.ErrorResponse
PagedPrompt
>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"/indexes": {
"get": {
"operationId": "Indexes_ListLatest",
"description": "List the latest version of each index.",
"description": "List the latest version of each index. Latest is defined by most recent created by date.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -124,7 +124,7 @@
"/indexes/{name}": {
"get": {
"operationId": "Indexes_GetLatest",
"description": "Get latest Index.",
"description": "Get latest version of the Index. Latest is defined by most recent created by date.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -168,7 +168,7 @@
"/indexes/{name}:getNextVersion": {
"post": {
"operationId": "Indexes_GetNextVersion",
"description": "Get next Index version.",
"description": "Get next Index version. This returns the latest version + 1.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -212,7 +212,7 @@
"/indexes/{name}/versions": {
"get": {
"operationId": "Indexes_List",
"description": "The most basic operation.",
"description": "List the versions of an Index given the name.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand All @@ -236,7 +236,7 @@
{
"name": "orderBy",
"in": "query",
"description": "Ordering of list: Please choose OrderBy value from ['createdtime', 'modifiedtime'].",
"description": "Ordering of list: Please choose orderby value from ['createdAt', 'lastModifiedAt'].",
"required": false,
"type": "string"
},
Expand Down Expand Up @@ -290,7 +290,7 @@
"/indexes/{name}/versions/{version}": {
"get": {
"operationId": "Indexes_Get",
"description": "Fetch a IndexVersion by name.",
"description": "Get a specific version of an Index.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -415,7 +415,7 @@
},
"stage": {
"type": "string",
"description": "Update stage to 'Archive' for soft delete. Default is Development, which means the asset is under development.",
"description": "Update stage to 'Archive' to archive the asset. Default is Development, which means the asset is under development.",
"default": "Development"
},
"description": {
Expand Down Expand Up @@ -519,7 +519,7 @@
},
"stage": {
"type": "string",
"description": "Update stage to 'Archive' for soft delete. Default is Development, which means the asset is under development.",
"description": "Update stage to 'Archive' to archive the asset. Default is Development, which means the asset is under development.",
"default": "Development"
},
"description": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"in": "path",
"description": "Supported Azure-AI asset endpoints.",
"required": true,
"type": "string"
"type": "string",
"format": "uri",
"x-ms-skip-url-encoding": true
},
{
"name": "subscriptionId",
Expand Down Expand Up @@ -112,9 +114,6 @@
"x-ms-examples": {
"Indexes_ListLatest": {
"$ref": "./examples/Indexes_ListLatest_MaximumSet_Gen.json"
},
"Indexes_ListLatest_MaximumSet_Gen": {
"$ref": "./examples/Indexes_ListLatest_MaximumSet_Gen.json"
}
},
"x-ms-pageable": {
Expand All @@ -136,8 +135,7 @@
"description": "Name of the index.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]*$",
"maxLength": 254
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]{0,254}$"
}
],
"responses": {
Expand All @@ -163,9 +161,6 @@
"x-ms-examples": {
"Indexes_GetLatest": {
"$ref": "./examples/Indexes_GetLatest_MaximumSet_Gen.json"
},
"Indexes_GetLatest_MaximumSet_Gen": {
"$ref": "./examples/Indexes_GetLatest_MaximumSet_Gen.json"
}
}
}
Expand Down Expand Up @@ -210,9 +205,6 @@
"x-ms-examples": {
"Indexes_GetNextVersion": {
"$ref": "./examples/Indexes_GetNextVersion_MaximumSet_Gen.json"
},
"Indexes_GetNextVersion_MaximumSet_Gen": {
"$ref": "./examples/Indexes_GetNextVersion_MaximumSet_Gen.json"
}
}
}
Expand Down Expand Up @@ -288,9 +280,6 @@
"x-ms-examples": {
"Indexes_List": {
"$ref": "./examples/Indexes_List_MaximumSet_Gen.json"
},
"Indexes_List_MaximumSet_Gen": {
"$ref": "./examples/Indexes_List_MaximumSet_Gen.json"
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -345,9 +334,6 @@
"x-ms-examples": {
"Indexes_Get": {
"$ref": "./examples/Indexes_Get_MaximumSet_Gen.json"
},
"Indexes_Get_MaximumSet_Gen": {
"$ref": "./examples/Indexes_Get_MaximumSet_Gen.json"
}
}
},
Expand Down Expand Up @@ -412,9 +398,6 @@
"x-ms-examples": {
"Indexes_CreateOrUpdate": {
"$ref": "./examples/Indexes_CreateOrUpdate_MaximumSet_Gen.json"
},
"Indexes_CreateOrUpdate_MaximumSet_Gen": {
"$ref": "./examples/Indexes_CreateOrUpdate_MaximumSet_Gen.json"
}
}
}
Expand Down Expand Up @@ -460,9 +443,6 @@
"x-ms-examples": {
"Prompts_ListLatest": {
"$ref": "./examples/Prompts_ListLatest_MaximumSet_Gen.json"
},
"Prompts_ListLatest_MaximumSet_Gen": {
"$ref": "./examples/Prompts_ListLatest_MaximumSet_Gen.json"
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -510,9 +490,6 @@
"x-ms-examples": {
"Prompts_GetLatest": {
"$ref": "./examples/Prompts_GetLatest_MaximumSet_Gen.json"
},
"Prompts_GetLatest_MaximumSet_Gen": {
"$ref": "./examples/Prompts_GetLatest_MaximumSet_Gen.json"
}
}
}
Expand Down Expand Up @@ -557,9 +534,6 @@
"x-ms-examples": {
"Prompts_GetNextVersion": {
"$ref": "./examples/Prompts_GetNextVersion_MaximumSet_Gen.json"
},
"Prompts_GetNextVersion_MaximumSet_Gen": {
"$ref": "./examples/Prompts_GetNextVersion_MaximumSet_Gen.json"
}
}
}
Expand Down Expand Up @@ -635,9 +609,6 @@
"x-ms-examples": {
"Prompts_List": {
"$ref": "./examples/Prompts_List_MaximumSet_Gen.json"
},
"Prompts_List_MaximumSet_Gen": {
"$ref": "./examples/Prompts_List_MaximumSet_Gen.json"
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -692,9 +663,6 @@
"x-ms-examples": {
"Prompts_Get": {
"$ref": "./examples/Prompts_Get_MaximumSet_Gen.json"
},
"Prompts_Get_MaximumSet_Gen": {
"$ref": "./examples/Prompts_Get_MaximumSet_Gen.json"
}
}
},
Expand Down Expand Up @@ -759,15 +727,55 @@
"x-ms-examples": {
"Prompts_CreateOrUpdate": {
"$ref": "./examples/Prompts_CreateOrUpdate_MaximumSet_Gen.json"
},
"Prompts_CreateOrUpdate_MaximumSet_Gen": {
"$ref": "./examples/Prompts_CreateOrUpdate_MaximumSet_Gen.json"
}
}
}
}
},
"definitions": {
"AssetVersion": {
"type": "object",
"description": "AssetVersion Definition",
"properties": {
"id": {
"type": "string",
"description": "Fully qualified resource Id: azureml://workspace/{workspaceName}/indexes/{name}/versions/{version} of the index.",
"readOnly": true
},
"stage": {
"type": "string",
"description": "Update stage to 'Archive' to archive the asset. Default is Development, which means the asset is under development.",
"default": "Development"
},
"description": {
"type": "string",
"description": "Description information of the asset."
},
"systemData": {
"$ref": "#/definitions/SystemData",
"description": "Metadata containing createdBy and modifiedBy information.",
"readOnly": true
},
"tags": {
"type": "object",
"description": "Asset's tags.",
"additionalProperties": {
"type": "string"
}
},
"properties": {
"type": "object",
"description": "Asset's properties.",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"id",
"stage"
]
},
"Azure.Core.Foundations.Error": {
"type": "object",
"description": "The error object.",
Expand Down Expand Up @@ -868,7 +876,6 @@
},
"storageUri": {
"type": "string",
"format": "uri",
"description": "Default workspace blob storage Uri. Should work across storage types and auth scenarios."
}
},
Expand Down Expand Up @@ -961,8 +968,7 @@
},
"dataUri": {
"type": "string",
"format": "uri",
"description": "Default workspace blob storage URI. Should work across storage types and auth scenarios."
"description": "Default workspace blob storage Ui. Should work across storage types and auth scenarios."
},
"templatePath": {
"type": "string",
Expand Down
Loading

0 comments on commit 979bc2b

Please sign in to comment.