Skip to content

Commit

Permalink
commit 4691c2a
Browse files Browse the repository at this point in the history
Author: Rakesh Kumar <rakku@microsoft.com>
Date:   Wed Jan 29 17:46:01 2020 -0800

    [AzureStack] User Subscription: rename NewSubscription to SubscriptionDefinition (Azure#8257)

commit 9e551f0
Author: bganapa <bganapa@microsoft.com>
Date:   Tue Nov 12 11:44:22 2019 -0800

    Reset to Stackadmin2 (Azure#7766)
  • Loading branch information
viananth committed Mar 31, 2020
1 parent 6049cf3 commit e86758c
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/NewSubscriptionParameter"
"$ref": "#/parameters/SubscriptionDefinitionParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -263,9 +263,9 @@
"description": "Id of the subscription.",
"x-ms-parameter-location": "method"
},
"NewSubscriptionParameter": {
"SubscriptionDefinitionParameter": {
"description": "Subscription parameter.",
"name": "newSubscription",
"name": "subscriptionDefinition",
"in": "body",
"schema": {
"$ref": "#/definitions/Subscription"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Subscriptions Admin

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

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

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

> `autorest --help`
---

## Configuration

### Basic Information
These are the global settings for the Subscriptions API.

``` yaml
title: SubscriptionClient
description: Subscription Management Client
openapi-type: arm
tag: package-2015-11-01
```
## Suppression
``` yaml
directive:
- suppress: XmsResourceInPutResponse
reason: Subscription is not modelled as ARM resource in azure for legacy reasons. In Azure stack as well, Subscription is not modelled as ARM resource for azure consistency
where:
- $.paths["/subscriptions/{subscriptionId}"].put

- suppress: R3023
reason: No operations endpoint as not ARM resource provider.

- suppress: SubscriptionIdParameterInOperations
reason: Subscription is the main resource in the API spec and it should not be masked in global parameters.
where:
- $.paths["/subscriptions/{subscriptionId}"].get.parameters[0]
- $.paths["/subscriptions/{subscriptionId}"].put.parameters[0]
- $.paths["/subscriptions/{subscriptionId}"].delete.parameters[0]

- suppress: BodyTopLevelProperties
reason: Subscription is not modelled as ARM resource in azure for legacy reasons. In Azure stack as well, Subscription is not modelled as ARM resource for azure consistency.
where:
- $.definitions.Subscription.properties

- suppress: RequiredPropertiesMissingInResourceModel
reason: Subscription is not modelled as ARM resource in azure for legacy reasons. In Azure stack as well, Subscription is not modelled as ARM resource for azure consistency.
where:
- $.definitions.Subscription

```

---
# Code Generation

## C#

``` yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Microsoft.AzureStack.Management.Subscription
payload-flattening-threshold: 1
output-folder: $(csharp-sdks-folder)/Generated
clear-output-folder: true
```
``` yaml
# include the azure profile definitions from the standard location
require: $(this-folder)/../../../../profiles/readme.md

# all the input files across all versions
input-file:
- $(this-folder)/Microsoft.Subscriptions/preview/2015-11-01/Subscriptions.json
- $(this-folder)/Microsoft.Subscriptions/preview/2015-11-01/Offer.json

```

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

``` yaml $(tag) == 'all-api-versions'
#exclude-file:
# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json
```
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,3 @@ These settings apply only when `--tag=package-2015-11-01 --python` is specified
``` yaml $(tag) == 'package-2015-11-01' && $(python)
namespace: azure.mgmt.subscriptions.v2015_06_01_preview
```

## Multi-API/Profile support for AutoRest v3 generators

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

This block is updated by an automatic script. Edits may be lost!

``` yaml $(tag) == 'all-api-versions' /* autogenerated */
# include the azure profile definitions from the standard location
require: $(this-folder)/../../../../profiles/readme.md
# all the input files across all versions
input-file:
- $(this-folder)/Microsoft.Subscriptions/preview/2015-11-01/Subscriptions.json
- $(this-folder)/Microsoft.Subscriptions/preview/2015-11-01/Offer.json
```

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

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

0 comments on commit e86758c

Please sign in to comment.