-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move swagger to subfolder and create autorest config readme files. The folder structure is selected to match the structure of the azure repository.
- Loading branch information
Showing
23 changed files
with
203 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
input-file: redhatopenshift/resource-manager/Microsoft.RedHatOpenshift/preview/2024-06-10-preview/openapi.json | ||
input-file: redhatopenshift/resource-manager/Microsoft.RedHatOpenshift/hcpclusters/preview/2024-06-10-preview/openapi.json | ||
use: | ||
# TODO: This is an old version. We should fix incompatibilities and remove this later | ||
- "@autorest/[email protected]" | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
126 changes: 63 additions & 63 deletions
126
...t/preview/2024-06-10-preview/openapi.json → ...s/preview/2024-06-10-preview/openapi.json
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...atopenshift/resource-manager/Microsoft.RedHatOpenshift/hcpclusters/readme.go.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,34 @@ | ||
## Go | ||
|
||
These settings apply only when `--go` is specified on the command line. | ||
|
||
``` yaml $(go) && !$(track2) | ||
go: | ||
license-header: MICROSOFT_MIT_NO_VERSION | ||
namespace: redhatopenshift | ||
clear-output-folder: true | ||
``` | ||
``` yaml $(go) && $(track2) | ||
license-header: MICROSOFT_MIT_NO_VERSION | ||
module-name: sdk/resourcemanager/redhatopenshifthcp/armredhatopenshifthcp | ||
module: github.com/Azure/azure-sdk-for-go/$(module-name) | ||
output-folder: $(go-sdk-folder)/$(module-name) | ||
azure-arm: true | ||
``` | ||
### Go multi-api | ||
``` yaml $(go) && $(multiapi) | ||
batch: | ||
- tag: package-2024-06-10-preview | ||
``` | ||
### Tag: 2024-06-10-preview and go | ||
These settings apply only when `--tag=package-2020-04-30 --go` is specified on the command line. | ||
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`. | ||
|
||
``` yaml $(tag) == '2024-06-10-preview' && $(go) | ||
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2024-06-10-preview/$(namespace) | ||
``` |
63 changes: 63 additions & 0 deletions
63
...edhatopenshift/resource-manager/Microsoft.RedHatOpenshift/hcpclusters/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,63 @@ | ||
# RedHatOpenshift HCP Clusters | ||
|
||
## This is the autorest configuration file for RedHatOpenshift HCP Clusters. | ||
|
||
The service is hosted under Microsoft.RedHatOpenshift namespace but HCP is exposed | ||
as a separarate set of resources, APIs and SDKs. | ||
|
||
## Getting Started | ||
|
||
To build the SDK for ContainerServices, [install Autorest](https://aka.ms/autorest/install). Then | ||
in this folder, run this command: | ||
|
||
> `autorest` | ||
To see additional help and options, run: | ||
|
||
> `autorest --help` | ||
--- | ||
|
||
## Configuration | ||
|
||
### Basic Information | ||
|
||
These are the global settings for the ContainerServices API. | ||
|
||
``` yaml | ||
openapi-type: arm | ||
tag: package-2024-06-10-preview | ||
``` | ||
### Tag: package-2024-06-10-preview | ||
These settings apply only when `--tag=package-2024-06-10-preview` is specified on the command line. | ||
|
||
``` yaml $(tag) == 'package-2024-06-10-preview' | ||
input-file: | ||
- preview/2024-06-10-preview/openapi.json | ||
``` | ||
|
||
# Code Generation | ||
|
||
## Swagger to SDK | ||
|
||
This section describes what SDK should be generated by the automatic system. | ||
This is not used by Autorest itself. | ||
|
||
``` yaml $(swagger-to-sdk) | ||
swagger-to-sdk: | ||
- repo: azure-sdk-for-python | ||
- repo: azure-sdk-for-go | ||
- repo: azure-resource-manager-schemas | ||
- repo: azure-powershell | ||
``` | ||
|
||
|
||
## Go | ||
|
||
See configuration in [readme.go.md](./readme.go.md) | ||
|
||
## Python | ||
|
||
See configuration in [readme.python.md](./readme.python.md) |
41 changes: 41 additions & 0 deletions
41
...enshift/resource-manager/Microsoft.RedHatOpenshift/hcpclusters/readme.python.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,41 @@ | ||
## Python | ||
|
||
These settings apply only when `--python` is specified on the command line. | ||
|
||
```yaml $(python) | ||
title: RedHatOpenShiftHcpMgmtClient | ||
azure-arm: true | ||
license-header: MICROSOFT_MIT_NO_VERSION | ||
package-name: azure-mgmt-redhatopenshifthcp | ||
package-version: 1.0.0b1 | ||
clear-output-folder: true | ||
no-namespace-folders: true | ||
``` | ||
### Python multi-api | ||
Generate all API versions currently shipped for this package | ||
```yaml $(python) | ||
default-api-version: "2024-06-10-preview" | ||
multiapi: true | ||
batch: | ||
- tag: package-2024-06-10-preview | ||
- multiapiscript: true | ||
``` | ||
``` yaml $(multiapiscript) | ||
output-folder: $(python-sdks-folder)/redhatopenshift/azure-mgmt-redhatopenshifthcp/azure/mgmt/redhatopenshifthcp/ | ||
clear-output-folder: false | ||
perform-load: false | ||
``` | ||
### Tag: package-2024-06-10-preview and python | ||
These settings apply only when `--tag=package-2024-06-10-preview --python` is specified on the command line. | ||
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`. | ||
|
||
``` yaml $(tag) == 'package-2024-06-10-preview' && $(python) | ||
namespace: azure.mgmt.redhatopenshifthcp.v2024_06_10_preview | ||
output-folder: $(python-sdks-folder)/redhatopenshift/azure-mgmt-redhatopenshifthcp/azure/mgmt/redhatopenshifthcp/v2024_06_10_preview | ||
``` |