Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
81c37bc
Ref resolving improvements (#1708)
olydis Jan 10, 2017
e20771a
tmp YAML merging override to unblock arm-recoveryservicesbackup (#1713)
olydis Jan 11, 2017
87162db
Added code to change the data type of ItemType (#1711)
sarangan12 Jan 11, 2017
6357e9a
Extension proposal (#1638)
fearthecowboy Jan 11, 2017
da94d34
[Ruby] Making credentials nil by default (#1677)
sarangan12 Jan 11, 2017
4262e85
[Linter Rules] M1005, M1006, M1007 & M1009 (#1706)
vishrutshah Jan 11, 2017
4ba4392
[linter Rules] Swagger rules M2005 - long running operation must have…
vishrutshah Jan 11, 2017
ce3aff4
Add insights swagger spec test, add vm extensions to swagger and sche…
Jan 12, 2017
e5b7c46
[Linter Rules] M2008 for x-ms-mutability extension (#1712)
vishrutshah Jan 13, 2017
e4e29d9
undo unblocking fix (#1718)
olydis Jan 13, 2017
fe833fb
Improvements for Mono & Docker users (#1714)
mandrean Jan 13, 2017
c60aa02
Better preprocessor and 3 bugfixes (#1717)
olydis Jan 13, 2017
7775505
added operationId and title as optional properties of the example sch…
amarzavery Jan 17, 2017
ceadb38
Fix NullReferenceException (#1722)
fearthecowboy Jan 18, 2017
6f49c0b
minor code cleanup in swagger validation rule file (#1724)
vishrutshah Jan 18, 2017
abc88d6
Generator should not flatten out parameters if they are polymorphic (…
fearthecowboy Jan 18, 2017
b0099f9
Changes to markdown file generation in AzureResourceSchema generator.…
jhendrixMSFT Jan 18, 2017
8aa53b1
Relaxing naming rules to accomodate suffix words in names
vishrutshah Jan 18, 2017
1f99f3b
[Go] Telemetry tiny detail (#1731)
mcardosos Jan 18, 2017
058715a
Fix for credentials switch (#1728)
annatisch Jan 20, 2017
fedab38
Fix for list and dict serialization (#1727)
annatisch Jan 20, 2017
33f5f6a
[Java] AutoRest changes by runtime changes (#1703)
jianghaolu Jan 24, 2017
3db4c82
Merge pull request #1732 from vishrutshah/swagger-rule-M1005-9
vishrutshah Jan 24, 2017
edd62e8
Fixed AutoRest.Python.Azure.Tests.AcceptanceTests.SampleTestForGenera…
olydis Jan 27, 2017
5acc2dd
Remove Azure extensions configuration from __init__ in Python (#1745)
lmazuel Jan 30, 2017
285ba60
Xml support (#1744)
olydis Jan 30, 2017
e41c947
Literate File Formats (#1743)
fearthecowboy Jan 31, 2017
cd3771b
Got rid of ReadOnly validation (#1749)
mcardosos Jan 31, 2017
c31497e
Fixed and improved UniqueResourcePaths linter rule (#1768)
olydis Jan 31, 2017
3ec6a17
cleaner code gen (less unnecessary code) (#1771)
olydis Jan 31, 2017
d7ac120
Make S.X.X a build-time dependency.
fearthecowboy Feb 1, 2017
84a1cb8
Fix #1738 (#1772)
fearthecowboy Feb 1, 2017
5788a5f
regex valitation for dictionary values (#1773)
olydis Feb 1, 2017
1fae9ec
Code changes to generate resources/subresources (#1769)
sarangan12 Feb 2, 2017
52f9a12
Removing sanitization for redable output paths
vishrutshah Feb 2, 2017
27a2135
Eliminate // in the Path output
vishrutshah Feb 2, 2017
27af724
Update SwaggerModelerCompareTests
vishrutshah Feb 2, 2017
af1de48
Fix generation of ARM markdown help files. (#1765)
jhendrixMSFT Feb 2, 2017
ae86c40
Adding new property for readable log output
vishrutshah Feb 3, 2017
019e58f
Merge pull request #1779 from vishrutshah/remove_sanitization
vishrutshah Feb 3, 2017
9e7956e
Linter Validation rules (#1751)
sarangan12 Feb 3, 2017
9e1bcda
Cache version strings after first generation. (#1784)
marstr Feb 7, 2017
77cb586
Update readme to reflect requirements of repo build (#1719)
Feb 8, 2017
3ffac4e
Update ms_rest and ms_rest_azure version for tests
vishrutshah Feb 8, 2017
f91b06a
Update minimum required runtime version message
vishrutshah Feb 8, 2017
b103293
Fix bug in parameter grouping in some languages (#1775)
matthchr Feb 8, 2017
c8b9e72
Fix ruby rspec test to deserialize post long-running operation
vishrutshah Feb 8, 2017
788875f
fix cross referencing models in relative swagger specs (#1805)
amarzavery Feb 9, 2017
8d48ac7
Fixed constant parameter (#1796)
annatisch Feb 9, 2017
781049a
Make Python tests less nervous about Exception string content (#1781)
lmazuel Feb 9, 2017
8c468db
[Go] Added x-ms-parametrized-host support (#1803)
mcardosos Feb 9, 2017
5b58543
Fixed bug 1763 and added unit tests (#1800)
dsgouda Feb 9, 2017
5e1dfc6
Fixing format bug preventing Go gen. (#1795)
marstr Feb 9, 2017
071b96f
[Linter] Adding rule to warn about boolean type properties (#1783)
veronicagg Feb 9, 2017
b638a29
[ReadMe] Change commands to fixed width font (#1774)
RobDolinMS Feb 9, 2017
afb11a7
Hotfix after Java runtime beta5 release
jianghaolu Feb 9, 2017
15afad5
Merge pull request #1799 from vishrutshah/update-ruby-runtime
vishrutshah Feb 9, 2017
cff6017
Merge pull request #1807 from jianghaolu/master
jianghaolu Feb 10, 2017
d92be9b
java tests
Feb 10, 2017
fc5fa72
Merge remote-tracking branch 'azure/master' into coreclr
Feb 10, 2017
4e2b7b4
regen
Feb 10, 2017
de0a68d
Merge remote-tracking branch 'azure/coreclr' into coreclr
Feb 10, 2017
6d40120
merged
Feb 10, 2017
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ AutoRest can be run on macOS and *nix using [Mono](http://www.mono-project.com/d
Or [Docker](https://docs.docker.com/engine/installation):

# Download Swagger.json example
curl -O https://raw.githubusercontent.com/Azure/autorest/master/Samples/petstore/petstore.json
`curl -O https://raw.githubusercontent.com/Azure/autorest/master/Samples/petstore/petstore.json`

# Download latest AutoRest Docker image
docker pull azuresdk/autorest:latest
`docker pull azuresdk/autorest:latest`

# Run AutoRest using Docker, mounting the current folder (pwd) into /home inside the container
docker run -it --rm -v $(pwd):/home azuresdk/autorest:latest autorest \
`docker run -it --rm -v $(pwd):/home azuresdk/autorest:latest autorest \
-CodeGenerator CSharp \
-Input /home/petstore.json \
-OutputDirectory /home/CSharp_PetStore -Namespace PetStore
-OutputDirectory /home/CSharp_PetStore -Namespace PetStore`

## Building AutoRest
AutoRest is developed primarily in C# but generates code for multiple languages. See [this link](docs/developer/guide/building-code.md) to build and test AutoRest.
Expand Down
22 changes: 11 additions & 11 deletions Samples/petstore/Go/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@ const (
// APIVersion is the version of the Petstore
APIVersion = "1.0.0"

// DefaultBaseURI is the default URI used for the service Petstore
DefaultBaseURI = "http://petstore.swagger.io/v2"
// DefaultBaseURI is the default URI used for the service Petstore
DefaultBaseURI = "http://petstore.swagger.io/v2"
)

// ManagementClient is the base client for Petstore.
type ManagementClient struct {
autorest.Client
BaseURI string
BaseURI string
APIVersion string
}

// New creates an instance of the ManagementClient client.
func New()ManagementClient {
return NewWithBaseURI(DefaultBaseURI, )
return NewWithBaseURI(DefaultBaseURI, )
}

// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
// NewWithBaseURI creates an instance of the ManagementClient client.
func NewWithBaseURI(baseURI string, ) ManagementClient {
return ManagementClient{
Client: autorest.NewClientWithUserAgent(UserAgent()),
BaseURI: baseURI,
APIVersion: APIVersion,
}
}
}

// AddPet adds a new pet to the store. You may receive an HTTP invalid input if
// your pet is invalid.
Expand Down
26 changes: 21 additions & 5 deletions Samples/petstore/Go/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,41 @@ package petstore


import (
"bytes"
"fmt"
"strings"
)

const (
major = "0"
minor = "0"
patch = "0"
// Always begin a "tag" with a dash (as per http://semver.org)
tag = "-beta"
semVerFormat = "%s.%s.%s%s"
tag = ""
userAgentFormat = "Azure-SDK-For-Go/%s arm-%s/%s"
)
// cached results of UserAgent and Version to prevent repeated operations.
var (
userAgent string
version string
)

// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return fmt.Sprintf(userAgentFormat, Version(), "petstore", "1.0.0")
if userAgent == "" {
userAgent = fmt.Sprintf(userAgentFormat, Version(), "petstore", "1.0.0")
}
return userAgent
}

// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return fmt.Sprintf(semVerFormat, major, minor, patch, tag)
if version == "" {
versionBuilder := bytes.NewBufferString(fmt.Sprintf("%s.%s.%s", major, minor, patch))
if tag != "" {
versionBuilder.WriteRune('-')
versionBuilder.WriteString(strings.TrimPrefix(tag, "-"))
}
version = string(versionBuilder.Bytes())
}
return version
}
1 change: 1 addition & 0 deletions attic/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ var goMappings = {
'url':['../../dev/TestServer/swagger/url.json','urlgroup'],
'validation':['../../dev/TestServer/swagger/validation.json', 'validationgroup'],
'paging':['../../dev/TestServer/swagger/paging.json', 'paginggroup'],
'more-custom-base-uri':['../../dev/TestServer/swagger/custom-baseUrl-more-options.json', 'morecustombaseurigroup'],
'azurereport':['../../dev/TestServer/swagger/azure-report.json', 'azurereport']
};

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/guide/building-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Expected time around 100 minutes to install.
- Windows 10 Anniversary - (has PackageManagement, developer mode and supports WSL.)
- JDK 8
- Android SDK
- NodeJS
- NodeJS (LTS Version: v6.9.4 or higher)
- Gulp
- Ruby 2.3
- Ruby Devkit
Expand Down
32 changes: 19 additions & 13 deletions gulpfile.iced
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,39 @@ autorest = (args) ->
###############################################
task 'test', "runs all tests", ->
run 'test-cs',
'test-go'
'test-java'
'test-node'
'test-ruby'
'test-python'
'test-go'
'test-ruby'

###############################################
###############################################
task 'test-go', 'runs Go tests', -> # FAILS, but also on master branch...
exec "glide up", { cwd: './src/generator/AutoRest.Go.Tests/src/tests' }
exec "go fmt ./generated/...", { cwd: './src/generator/AutoRest.Go.Tests/src/tests' }
exec "go run ./runner.go", { cwd: './src/generator/AutoRest.Go.Tests/src/tests' }

###############################################
task 'test-java', 'runs Java tests', ->
exec "mvn test", { cwd: './src/generator/AutoRest.Java.Tests/' }
exec "mvn test", { cwd: './src/generator/AutoRest.Java.Azure.Tests/' }

###############################################
task 'test-node', 'runs NodeJS tests', ->
exec "npm test", { cwd: './src/generator/AutoRest.NodeJS.Tests/' }
#exec "npm test", { cwd: './src/generator/AutoRest.NodeJS.Tests/' }
exec "npm test", { cwd: './src/generator/AutoRest.NodeJS.Azure.Tests/' }

###############################################
###############################################
task 'test-python', 'runs Python tests', ->
exec "tox", { cwd: './src/generator/AutoRest.Python.Tests/' }
exec "tox", { cwd: './src/generator/AutoRest.Python.Azure.Tests/' }

###############################################
###############################################
task 'test-ruby', 'runs Ruby tests', ->
exec "ruby RspecTests/tests_runner.rb", { cwd: './src/generator/AutoRest.Ruby.Tests/' }
exec "ruby RspecTests/tests_runner.rb", { cwd: './src/generator/AutoRest.Ruby.Azure.Tests/' }

###############################################
task 'test-go', 'runs Go tests', ['regenerate-go'], -> # FAILS, but also on master branch...
exec "glide up", { cwd: './src/generator/AutoRest.Go.Tests/src/tests' }
exec "go fmt ./generated/...", { cwd: './src/generator/AutoRest.Go.Tests/src/tests' }
exec "go run ./runner.go", { cwd: './src/generator/AutoRest.Go.Tests/src/tests' }

###############################################
###############################################
# LEGACY
# Instead: have bunch of configuration files sitting in a well-known spot, discover them, feed them to AutoRest, done.

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
<dependency>
<groupId>com.microsoft.rest</groupId>
<artifactId>client-runtime</artifactId>
<version>1.0.0-beta5-SNAPSHOT</version>
<version>1.0.0-beta6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-runtime</artifactId>
<version>1.0.0-beta5-SNAPSHOT</version>
<version>1.0.0-beta6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Expand Down
9 changes: 9 additions & 0 deletions src/core/AutoRest.Core/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/core/AutoRest.Core/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,7 @@
<data name="InvalidMutabilityValueForReadOnly" xml:space="preserve">
<value>When property is modeled as "readOnly": true then x-ms-mutability extension can only have "read" value. When property is modeled as "readOnly": false then applying x-ms-mutability extension with only "read" value is not allowed. Extension contains invalid values: '{0}'.</value>
</data>
<data name="BooleanPropertyNotRecommended" xml:space="preserve">
<value>Booleans are not descriptive and make them hard to use. Instead use string enums with allowed set of values defined: '{0}'.</value>
</data>
</root>
1 change: 0 additions & 1 deletion src/core/AutoRest/Simplify/CSharpSimplifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using Newtonsoft.Json;
using AutoRest.Core.Utilities;
using System.Net;
using System.Reflection;

namespace AutoRest.Simplify
{
Expand Down
Loading