Skip to content

Commit cb405da

Browse files
search: adding the autorest files necessary to generate a Data Plane SDK (#15316)
1 parent 7b8b9eb commit cb405da

File tree

2 files changed

+46
-12
lines changed

2 files changed

+46
-12
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Go
2+
These settings apply only when `--go` is specified on the command line.
3+
``` yaml $(go)
4+
go:
5+
license-header: MICROSOFT_MIT_NO_VERSION
6+
clear-output-folder: true
7+
```
8+
### Go multi-api
9+
``` yaml $(go) && $(multiapi)
10+
batch:
11+
- tag: package-2019-05-searchindex
12+
- tag: package-2019-05-searchservice
13+
```
14+
15+
### Tag: package-2019-05-searchindex and go
16+
17+
These settings apply only when `--tag=package-2019-05-searchindex --go` is specified on the command line.
18+
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
19+
20+
``` yaml $(tag) == 'package-2019-05-searchindex' && $(go)
21+
namespace: searchindex
22+
output-folder: $(go-sdk-folder)/services/search/2019-05-01/$(namespace)
23+
```
24+
25+
26+
### Tag: package-2019-05-searchservice and go
27+
28+
These settings apply only when `--tag=package-2019-05-searchservice --go` is specified on the command line.
29+
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.
30+
31+
``` yaml $(tag) == 'package-2019-05-searchservice' && $(go)
32+
namespace: searchservice
33+
output-folder: $(go-sdk-folder)/services/search/2019-05-01/$(namespace)
34+
```

specification/search/data-plane/Azure.Search/readme.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SearchServiceClient and SearchIndexClient
2-
2+
33
> see https://aka.ms/autorest
44
55
This is the AutoRest configuration file for SearchServiceClient and SearchIndexClient.
66

77

88
---
9-
## Getting Started
9+
## Getting Started
1010

1111
To build the SDK for SearchServiceClient and SearchIndexClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
1212

@@ -19,7 +19,7 @@ To see additional help and options, run:
1919

2020
## Configuration
2121

22-
### Basic Information
22+
### Basic Information
2323
These are the global settings for SearchServiceClient and SearchIndexClient.
2424

2525
``` yaml
@@ -510,7 +510,7 @@ directive:
510510
.replace(/(COSMOS_DB)/g, "COSMOS")
511511
```
512512

513-
## C#
513+
## C#
514514

515515
These settings apply only when `--csharp` is specified on the command line.
516516
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.
@@ -523,7 +523,7 @@ csharp:
523523
clear-output-folder: true
524524
output-folder: $(csharp-sdks-folder)/search/Azure.Search/src/Generated
525525
526-
directive:
526+
directive:
527527
# TODO: Simplify all the below regexes once we gain the ability to target them at specific files.
528528
529529
# Rename the IDocumentsOperations interface and implementation, then make the interface internal so we can version it freely.
@@ -694,10 +694,10 @@ directive:
694694
- from: source-file-csharp
695695
where: $
696696
transform: >-
697-
if ($.includes("class DataSourcesOperations") || $.includes("class IndexersOperations") ||
697+
if ($.includes("class DataSourcesOperations") || $.includes("class IndexersOperations") ||
698698
$.includes("class IndexesOperations") || $.includes("class SynonymMapsOperations") ||
699-
$.includes("class SkillsetsOperations"))
700-
699+
$.includes("class SkillsetsOperations"))
700+
701701
return $.
702702
replace( /this.SearchServiceName/g, "Client.SearchServiceName" ).
703703
replace( /this.SearchDnsSuffix/g, "Client.SearchDnsSuffix" ).
@@ -709,7 +709,7 @@ directive:
709709
# that we've had in the Azure Search .NET SDK since it was first released. We've decided to keep the custom behavior of
710710
# Field just for .NET for the sake of backward compatibility, but for other languages the client behavior will conform
711711
# to the REST API.
712-
#
712+
#
713713
# To achieve this, we need to make the generated constructors internal, as well as some of the generated properties.
714714
- from: source-file-csharp
715715
where: $
@@ -725,7 +725,7 @@ directive:
725725
replace( /public (bool\? Facetable { get; set; })/g, "internal $1" );
726726
```
727727

728-
## Multi-API/Profile support for AutoRest v3 generators
728+
## Multi-API/Profile support for AutoRest v3 generators
729729

730730
AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files.
731731

@@ -750,10 +750,10 @@ input-file:
750750
751751
```
752752

753-
If there are files that should not be in the `all-api-versions` set,
753+
If there are files that should not be in the `all-api-versions` set,
754754
uncomment the `exclude-file` section below and add the file paths.
755755

756756
``` yaml $(tag) == 'all-api-versions'
757-
#exclude-file:
757+
#exclude-file:
758758
# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json
759759
```

0 commit comments

Comments
 (0)