Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests-upgrade/Configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"datamodels-datatypes-array",
"datamodels-datatypes-integer",
"datamodels-datatypes-string",
"datamodels-combineschema",
"directive-model",
"directive-tableformat",
"extension-ms-azureresource",
Expand Down
10 changes: 10 additions & 0 deletions tests-upgrade/datamodels-combineschema/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### AutoRest Configuration
> see https://aka.ms/autorest

``` yaml
require:
- $(this-folder)/../readme.azure.noprofile.md
input-file:
- $(this-folder)/swagger.json

```
105 changes: 105 additions & 0 deletions tests-upgrade/datamodels-combineschema/swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{

"swagger": "2.0",
"info": {
"title": "DatabricksClient",
"version": "2018-04-01",
"description": "ARM Databricks"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/pets": {
"patch": {
"tags": [
"pets"
],
"operationId": "Pets_Update",
"description": "Gets pet list.",
"parameters": [
{
"name": "pets",
"in": "body",
"required": true,
"description": "The pets update.",
"schema": {
"$ref":"#/definitions/Dog"
}
}
],
"responses": {
"200": {
"description": "OK-Return workspace."
}
}
}
}
},
"definitions": {
"Pet": {
"type": "object",
"properties": {
"petType": {
"type": "string"
}
}
},
"Dog":{
"type": "object",
"properties": {
"bark": {
"type": "boolean"
},
"breed": {
"type": "string"
}
}
},
"Cat": {
"allOf": [
{
"$ref": "#/definitions/Pet"

},
{
"type": "object",
"properties": {
"hunts": {
"type": "boolean"
},
"age": {
"type": "integer"
}
}
}
]

}
}
}
10 changes: 10 additions & 0 deletions tests-upgrade/datamodels-datatypes-object/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### AutoRest Configuration
> see https://aka.ms/autorest

``` yaml
require:
- $(this-folder)/../readme.azure.noprofile.md
input-file:
- $(this-folder)/swagger.json

```
131 changes: 131 additions & 0 deletions tests-upgrade/datamodels-datatypes-object/swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{

"swagger": "2.0",
"info": {
"title": "DatabricksClient",
"version": "2018-04-01",
"description": "ARM Databricks"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/resourceGroup": {
"get": {
"tags": [
"Workspaces"
],
"operationId": "Workspaces_Get",
"description": "Gets the workspace.",
"responses": {
"200": {
"description": "OK-Return workspace."
}
}
}
}
},
"definitions": {
"Model": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "integer"
}
}
},
"Model2": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"username": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"username"
]
},
"Model3": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"password": {
"type": "string"
}
},
"required": [
"id",
"username"
]
},
"ContactInfo": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email"
},
"phone": {
"type": "string"
}
}
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"contact_info": {
"$ref": "#/definitions/ContactInfo"
}
}
},
"Model4": {
"type": "object",
"minProperties": 2,
"maxProperties": 10
}
}
}