-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
8,273 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/extensions/openapi-to-typespec/test/search/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
```yaml | ||
library-name: Search | ||
namespace: Azure.Search | ||
isAzureSpec: true | ||
require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/search/data-plane/Azure.Search/readme.md | ||
#tag: package-preview-2023-06 | ||
modelerfour: | ||
flatten-payloads: false | ||
deserialize-null-collection-as-null-value: true | ||
``` |
45 changes: 45 additions & 0 deletions
45
packages/extensions/openapi-to-typespec/test/search/tsp-output/main.tsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS | ||
* Generated by package: @autorest/openapi-to-typespec | ||
* Version: Not generated in test | ||
* Date: Not generated in test | ||
*/ | ||
import "@typespec/rest"; | ||
import "@typespec/http"; | ||
import "./routes.tsp"; | ||
|
||
using TypeSpec.Rest; | ||
using TypeSpec.Http; | ||
using TypeSpec.Versioning; | ||
/** | ||
* Client that can be used to manage and query indexes and documents, as well as | ||
* manage other resources, on a search service. | ||
*/ | ||
@service({ | ||
title: "SearchClient", | ||
}) | ||
@versioned(Versions) | ||
@server( | ||
"{endpoint}", | ||
"Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service.", | ||
{ | ||
/** | ||
* The name of the index. | ||
*/ | ||
indexName: string, | ||
|
||
endpoint: string, | ||
} | ||
) | ||
namespace Azure.Search; | ||
|
||
/** | ||
* The available API versions. | ||
*/ | ||
enum Versions { | ||
/** | ||
* The 2024-07-01 API version. | ||
*/ | ||
@useDependency(Azure.Core.Versions.v1_0_Preview_1) | ||
v2024_07_01: "2024-07-01", | ||
} |
Oops, something went wrong.