Skip to content

Commit

Permalink
[Azure Search] Updating AutoRest config files (Azure#2465)
Browse files Browse the repository at this point in the history
Fixed client name in the management plane config.

Split the data plane config into three files:
  - readme.md: Contains the config settings common to both data plane specs.
  - readme.index.md: Contains config settings specific to SearchIndexClient.
  - readme.service.md: Contains config settings specific to
SearchServiceClient.

This was necessary in order to get the Swagger validator to run correctly,
since otherwise it was combining the specs into one and crashing because they
both contain x-ms-parameterized-host. The intent is to have separate specs,
since the Azure Search data plane SDK is comprised of two separate clients
(one statically-typed for the base resources, and one dynamically-typed for
customer-specific index schemas).
  • Loading branch information
brjohnstmsft authored and mcardosos committed Feb 9, 2018
1 parent 7a519c4 commit 7fc5160
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 69 deletions.
74 changes: 74 additions & 0 deletions specification/search/data-plane/readme.index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# SearchIndexClient

> see https://aka.ms/autorest
This is the AutoRest configuration file for SearchIndexClient.



---
## Getting Started
To build the SDK for SearchIndexClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest --index`
To see additional help and options, run:

> `autorest --help`
---

## Configuration

### Tag: package-2016-09-preview

These settings apply only when `--tag=package-2016-09-preview` is specified on the command line.

``` yaml $(tag) == 'package-2016-09-preview'
input-file:
- Microsoft.Search/preview/2016-09-01-preview/searchindex.json
```
### Tag: package-2016-09
These settings apply only when `--tag=package-2016-09` is specified on the command line.

``` yaml $(tag) == 'package-2016-09'
input-file:
- Microsoft.Search/preview/2016-09-01/searchindex.json
```

### Tag: package-2015-02-preview

These settings apply only when `--tag=package-2015-02-preview` is specified on the command line.

``` yaml $(tag) == 'package-2015-02-preview'
input-file:
- Microsoft.Search/preview/2015-02-28-preview/searchindex.json
```

### Tag: package-2015-02

These settings apply only when `--tag=package-2015-02` is specified on the command line.

``` yaml $(tag) == 'package-2015-02'
input-file:
- Microsoft.Search/preview/2015-02-28/searchindex.json
```


---
# Code Generation

!!! READ THIS !!!
This swagger is not yet ready for languages other than C#.
!!! READ THIS !!!

## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

``` yaml $(csharp)
csharp:
output-folder: $(csharp-sdks-folder)/Search/DataPlane/Microsoft.Azure.Search/GeneratedSearchIndex
```
73 changes: 8 additions & 65 deletions specification/search/data-plane/readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# SearchClient
# Search

> see https://aka.ms/autorest
This is the AutoRest configuration file for SearchClient.
This is the AutoRest configuration file for the Azure Search data plane.



---
## Getting Started
To build the SDK for SearchClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
The Azure Search data plane SDK is comprised of two clients: SearchServiceClient, and SearchIndexClient. To build the data plane SDK for Azure Search, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`
> `autorest --service`
> `autorest --index`
To see additional help and options, run:

Expand All @@ -22,58 +23,17 @@ To see additional help and options, run:


### Basic Information
These are the global settings for the SearchClient API.
These are the global settings for the Azure Search data plane API.

C# packages this RP a little different from the others, so the following defaults don't apply to it.
C# packages this service a little different from the others, so the following defaults don't apply to it.

``` yaml !$(csharp)
title: SearchClient
description: Search Client
openapi-type: data-plane
tag: package-2016-09
tag: package-2016-09-preview
```
### Tag: package-2016-09-preview
These settings apply only when `--tag=package-2016-09-preview` is specified on the command line.

``` yaml $(tag) == 'package-2016-09-preview'
input-file:
- Microsoft.Search/preview/2016-09-01-preview/searchindex.json
- Microsoft.Search/preview/2016-09-01-preview/searchservice.json
```

### Tag: package-2016-09

These settings apply only when `--tag=package-2016-09` is specified on the command line.

``` yaml $(tag) == 'package-2016-09'
input-file:
- Microsoft.Search/preview/2016-09-01/searchindex.json
- Microsoft.Search/preview/2016-09-01/searchservice.json
```

### Tag: package-2015-02-preview

These settings apply only when `--tag=package-2015-02-preview` is specified on the command line.

``` yaml $(tag) == 'package-2015-02-preview'
input-file:
- Microsoft.Search/preview/2015-02-28-preview/searchindex.json
- Microsoft.Search/preview/2015-02-28-preview/searchservice.json
```

### Tag: package-2015-02

These settings apply only when `--tag=package-2015-02` is specified on the command line.

``` yaml $(tag) == 'package-2015-02'
input-file:
- Microsoft.Search/preview/2015-02-28/searchindex.json
- Microsoft.Search/preview/2015-02-28/searchservice.json
```


---
# Code Generation
Expand All @@ -91,22 +51,5 @@ csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Microsoft.Azure.Search
output-folder: $(csharp-sdks-folder)/Search/DataPlane/Microsoft.Azure.Search/Generated$(search-folder)
clear-output-folder: true
```


## Java

These settings apply only when `--java` is specified on the command line.
Please also specify `--azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>`.

``` yaml $(java)
java:
azure-arm: true
fluent: true
namespace: com.microsoft.azure.search
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-search
```
74 changes: 74 additions & 0 deletions specification/search/data-plane/readme.service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# SearchServiceClient

> see https://aka.ms/autorest
This is the AutoRest configuration file for SearchServiceClient.



---
## Getting Started
To build the SDK for SearchServiceClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest --service`
To see additional help and options, run:

> `autorest --help`
---

## Configuration

### Tag: package-2016-09-preview

These settings apply only when `--tag=package-2016-09-preview` is specified on the command line.

``` yaml $(tag) == 'package-2016-09-preview'
input-file:
- Microsoft.Search/preview/2016-09-01-preview/searchservice.json
```
### Tag: package-2016-09
These settings apply only when `--tag=package-2016-09` is specified on the command line.

``` yaml $(tag) == 'package-2016-09'
input-file:
- Microsoft.Search/preview/2016-09-01/searchservice.json
```

### Tag: package-2015-02-preview

These settings apply only when `--tag=package-2015-02-preview` is specified on the command line.

``` yaml $(tag) == 'package-2015-02-preview'
input-file:
- Microsoft.Search/preview/2015-02-28-preview/searchservice.json
```

### Tag: package-2015-02

These settings apply only when `--tag=package-2015-02` is specified on the command line.

``` yaml $(tag) == 'package-2015-02'
input-file:
- Microsoft.Search/preview/2015-02-28/searchservice.json
```


---
# Code Generation

!!! READ THIS !!!
This swagger is not yet ready for languages other than C#.
!!! READ THIS !!!

## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

``` yaml $(csharp)
csharp:
output-folder: $(csharp-sdks-folder)/Search/DataPlane/Microsoft.Azure.Search/GeneratedSearchService
```
8 changes: 4 additions & 4 deletions specification/search/resource-manager/readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# SearchClient
# SearchManagementClient

> see https://aka.ms/autorest
This is the AutoRest configuration file for SearchClient.
This is the AutoRest configuration file for SearchManagementClient.



---
## Getting Started
To build the SDK for SearchClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:
To build the SDK for SearchManagementClient, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`
Expand All @@ -22,7 +22,7 @@ To see additional help and options, run:


### Basic Information
These are the global settings for the SearchClient API.
These are the global settings for the SearchManagementClient API.

``` yaml
openapi-type: arm
Expand Down

0 comments on commit 7fc5160

Please sign in to comment.