Граф коммитов

65 Коммитов

Автор SHA1 Сообщение Дата
Travis Prescott 5d30a84409
Fix dictionary serialization and restore tests. (#318)
* Fix dictionary serialization and restore tests.

* Update MacOS version and Swift tools version.
2021-08-12 13:36:19 -07:00
Travis Prescott d84015d68c
Ensure property visibility is consistent with containing class visibility. (#315)
* Make property visibility honor containing model visibility.

* Make client options generation not inherit from client.

* Fix Options generation. Move API Version from Client (which may be internal) to Options (which should be public)

* Regenerate test code.

* Update test paths.
2021-05-24 14:23:34 -07:00
Travis Prescott a40ee17a34
Set swift-tools-version to 5.0 (#313)
* Set swift-tools-version to 5.0.

* Set generated Package.swift to 5.0.
2021-05-11 14:02:23 -07:00
Travis Prescott 582c848219
Add support to designate models and enums as internal (#311)
* Support --internal-models for objects and enums.

* Rename to `--remap-models`

* Support aliasing all names.

* Replace azure-sdk-for-ios.git references with SwiftPM-AzureCore.git

* Prevent overwriting certain files if they already exist.

* Fix exists check.

* Fix for options visibility.

* Generate options files outside an extension.

* Apply remapping to parameter types and return types.

* Alias PagedCollection types.

* Restore logging back to warning.

* Regenerate tests

* Regenerate file and update.

* Update tests.

* Change `--remap-models` to `--generate-as-internal`
2021-05-05 14:57:34 -07:00
Travis Prescott 0c2581d061
Fix issue #305 (#306)
* Fix issue with reserved keyword names.

* Remove Equatable conformance.

* Regenerate testserver test files.

* Disable tests the require equatable.
2021-03-02 14:05:00 -08:00
Travis Prescott 67f474d33c
Regenerate code. (#297) 2021-01-28 15:48:10 -08:00
Travis Prescott be4d59d51c
Testserver tests for body-dictionary (#293)
* Add body-dictionary tests.

* Progress on dictionary tests.

* Refactor tests to one call per test.

* Update to use Iso8601Duration.

* Add support for body-duration.

* Fix array tests for duration.

* Regenerate code with updates.

* Fix base64UrlPath test.

* Remove tests that won't pass.

* Comment out failing tests.
2021-01-28 11:36:39 -08:00
Travis Prescott 9301ddcfd2
Fixes for Chat Preview 3. (#296)
* Fix merge-patch body serialization.

* Fix merge patch syntax error.

* Fix request parameter serialization

* Regenerate test code.
2021-01-20 15:57:44 -08:00
Travis Prescott e7351b8259
Add Client-Side Validation and Testserver Tests (#290)
* Add validation.json tests.

* Plumb apiVersion through to client.

* Add validation to code generation.

* Support several validation scenarios.

* Fixes for const in body.

* Fix issues generating properties from constants.

* Validation code fixes and new tests.

* Disable apiVersion test until outstanding modeler4 issue resolved.
2021-01-05 06:53:52 -08:00
Travis Prescott a8db9fc2d1
Add test coverage extensible-enums-swagger.json (#289)
* Extension enum test code generation.

* Progress on extensible enum.

* Finish extensible-enums-swagger.json test.
2020-12-21 14:18:34 -08:00
Travis Prescott bf7e3315fb
Refactor Autorest.Swift for changes to AzureCore (#285)
* Point to AzureCore dev branch.

* Remove workarounds and fix formatting.

* Refactor templates

* Refactoring progress.

* Wipe all existing tests.

* Regenerate URL test code.

* Progress on URL.json

* Re-enable URL, reports and Rfc1123Date tests.

* Restore body-integer tests.

* Restore body-date.

* Restore body-datetime tests.

* Restore head tests.

* Restore model-flattening tests.

* Restore body-file tests.

* Restore body-number tests.

* Restore body-string tests.

* Restore xms-error-responses tests.

* Restore body-byte tests.

* Restore header, body-boolean, body-array tests.

* Restore custom-baseUrl and custom-baseUrl-more-options tests.

* Restore url-multi-collectionFormat tests.

* Port changes from PR 279.

* Work on body-date fixes.

* Fixes for body-time.

* Fixes for path tests.

* Refactor stencils.

* Fix up url query tests.

* Fixes for exploded query params.

* Fixes for parameter flattening.

* Restore script change.

* Revert generated changes.

* Retarget AzureCore master branch.

* Regenerate test code. (#286)

* Code review feedback.
2020-12-14 14:27:33 -08:00
Sam Cheung 2561016116
Add test cases for required-optional.json , body-time.json , body-array.json (#279)
* Fix Autorest Swift to support body-array.json, required-optional.json test cases

* Add test cases

* Regenerated code

* Fix AutoswiftSwift to support body-time

* Add test cases for body-time.json

* Add generated code for body-time

* Fix compile warning

* Add test cases for header and body-array

* Add test cases for body-array

* Add test cases for body-array

* Comment out failing test.

Co-authored-by: Travis Prescott <trpresco@microsoft.com>
2020-12-03 11:33:26 -08:00
Sam Cheung b0133604a5
Fix Autorest Swift to generate compile code for paging.json (#277)
* Use serialized name as key for query parameters

* Use self.client in PageCollection

* Look up api version from operation

* Handle endpoint and apiVersion variable in client

* Refactor ZZZAutoRestReportTest.swift

* Refactor Datetime formatter

* Refactor templates

* Fix for number.json test case

* Revert "Refactor ZZZAutoRestReportTest.swift"

This reverts commit 5bef83b1ca.

* Revert change in templates/OperationResponseJsonDecoderSnippet.stencil

* Fix for body-array.json

* Refactor OperationResponseBodySnippet.stencil

* Remove unnecesary files

* Always call 'make install' before generating code for test swagger

* WIP

* Fix XCode project and deleted unnecessary stencil

* Code compile

* Refactor

* Refactor

* Test cases and Generated code for paging.json (#278)

* Add generated code for paging.json

* Add test case for paging.json

* Add test case for paging.json

* Address PR feedback

* Address PR feedback
2020-12-03 10:45:21 -08:00
Sam Cheung adb8c24d59
Fix issues in test swagger body-date.json, body-datetime.json, body-datetime-rfc1123.json, body-array.json (#271)
* Use serialized name as key for query parameters

* Use self.client in PageCollection

* Look up api version from operation

* Handle endpoint and apiVersion variable in client

* Refactor ZZZAutoRestReportTest.swift

* Refactor Datetime formatter

* Refactor templates

* Fix for number.json test case

* Revert "Refactor ZZZAutoRestReportTest.swift"

This reverts commit 5bef83b1ca.

* Revert change in templates/OperationResponseJsonDecoderSnippet.stencil

* Fix for body-array.json

* Refactor OperationResponseBodySnippet.stencil

* Remove unnecesary files

* Always call 'make install' before generating code for test swagger

* Refactor sending Date, DateTime in json request body

* Add XCode project change

* Fix Response body encoding when body is an array of Date

* Address PR feedback

* New test cases for body-date.json, body-datetime.json, body-datetime-rfc1123.json, body-array.json (#272)

* Add new test cases for body-date, body-datetime, body-datetime-rfc1123

* Add new test cases in AutoRestNumberTest.swift

* Add generated test code

* Checkin the test/integration/generated/body-date/Source/DateOperation.swift

* Add test cases for body-array.json

* Add new test cases for AutorestSwiftTest/AutoRestSwaggerBatArrayTest.swift

* Add generated code

* Add regenerated code

* Regenerated test code

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>
2020-11-24 14:59:30 -08:00
Sam Cheung b7f2b92ebc
Fix AutorestSwift to generate Chat SDK (#270)
* Use serialized name as key for query parameters

* Use self.client in PageCollection

* Look up api version from operation

* Handle endpoint and apiVersion variable in client

* Enchance test_chat_swagger.py to support more scenarios

* Commit generated code

* Regenerate test swagger code

* Address PR feedback

* Bug fix scripts/test_chat_swagger.py
2020-11-23 12:10:13 -08:00
Travis Prescott 668237ff2c
Create generated folder (#269)
* Relocate generated files to Generated folder.

* Regenerate test files in Sources/Generated

* Regenerate test swagger code

* Add stencils that aren't in project.

* Add missing stencil file in xcode project

* Add missing stencil file in xcode project

* Remove duplicate stencil file in xcode project

* Remove duplicate stencil file in xcode project

* Don't regenerate Package.swift or README.md

Co-authored-by: Sam Cheung <sacheu@microsoft.com>
2020-11-23 09:48:00 -08:00
Sam Cheung 570a82efdf
Test cases and generated code for body-date, body-datetime, body-datetimerfc1123 (#265)
* Add test case for body-date.json

* Refactor how KeyValueViewModel.swift gets values

* Fix AutorestSwift to support body-date.json, body-datetime.json, body-datetime-rfc1123.json

* Support body-date body-datetime body-dattimerfc1123

* template refactoring

* Add test cases for date, datetime, datetime rfc1123

* Add generated code

* Remove test case AutorestSwiftTest/AutoRestDateTest.swift

* Remove test case AutorestSwiftTest/AutoRestDateTest.swift

* Add ../scripts/testserver_codegen.py

* Fix merge issue
2020-11-20 14:30:08 -08:00
Travis Prescott 4e0a65bd2a
Modifications to Generate Storage (#248)
* Alterations to generate AzureStorageBlob.

* Stop using serializedName in place of name.

* Regenerate test code.

* Restore commented out asserts, and code review feedback.
2020-11-20 10:56:21 -08:00
Sam Cheung 7d19110a8c
Add test case for custom-baseUrl-more-options.json (#263)
* Add test case for CustomerBaseUrlOptionTest

* Add script to test swagger

* Add test case for CustomerBaseUrlOptionTest
2020-11-19 15:07:19 -08:00
Sam Cheung 0f90d879f4
Support url multi collection format (#261)
* Support explode in array parameter

* Add Generated Code

* Update after merge
2020-11-19 10:48:58 -08:00
Sam Cheung b1c5067011
Add 5 test cases for body-boolean (#257)
* Add test cases for body-boolean.json

* Add test cases for body-boolean.json

* For query parameter, wrap boolean with String object. For body, just pass the boolean to JSONEncoder

* For query parameter, wrap boolean with String object. For body, just pass the boolean to JSONEncoder
2020-11-18 16:33:48 -08:00
Sam Cheung e1a859bb05
New 8 test cases for Url.json (#255)
* Add test cases for body-byte.json

* Add putBase64UrlEncoded test case

* Remove unnecessary file

* Remove create project option in testserver_codegen.py

* Add generated code for body-number.json

* Change default swift type for Number from Float to Double

* Add test case for AutorestSwiftTest/AutoRestNumberTest.swift

* Update to use decimal

* All code compiled

* Refactor

* All code compiled. 5 number test failed

* Refactor

* Fix compile warnings in test case

* WIP. All generated code compiled. But test cases failed to compile

* Add generated code for header.json

* Bug fix

* Bug fix

* Bug fix. Fix broken tests

* Refactor

* Refactor

* All generated code compiled

* Add decode Demical to String

* Refactor

* Change to use param.name

* WIP

* WIP

* WIP

* Fix compile error

* WIP. all generated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP

* Regenerate test code

* Fix compile issue

* Refactor

* Bug fixes.

* Bug fix:

* Address PR feedback

* Fix compile warnings and all test cases passed

* Refactor

* Refactor

* Refactor

* Merge changes

* WIP. All tests passed

* All generated code compile. All test cases pass

* Refactor

* Refactor

* Refactor

* Address PR feedback

* Add asserts

* Use property name in find property from an array

* Fix compile eror in generated code

* Changes to enabel required-optional.json to compile

* Add generated code for required-optional

* Change testserver_codegen.py to support single file swagger name

* Fix autorest to compile body-array.json

* Fix autorest swift to generate code for body-array.json

* add generated code for body-array.json

* Add support for Rfc1123 datetime format

* Regeneate test code

* Add new test cases for url.json

* Add new test cases for url.json

* WIP

* Combine templates/OperationMethodDecodingSnippet.stencil with templates/OperationDecodingSnippet.stencil

* Refactor

* Fix UnixTime encoding

* Remove unnecesary file

* Refactor

* Refactor
2020-11-17 10:11:58 -08:00
Sam Cheung b73af56d4a
Fix to enable required-optional.json & body-array.json (#254)
* Add test cases for body-byte.json

* Add putBase64UrlEncoded test case

* Remove unnecessary file

* Remove create project option in testserver_codegen.py

* Add generated code for body-number.json

* Change default swift type for Number from Float to Double

* Add test case for AutorestSwiftTest/AutoRestNumberTest.swift

* Update to use decimal

* All code compiled

* Refactor

* All code compiled. 5 number test failed

* Refactor

* Fix compile warnings in test case

* WIP. All generated code compiled. But test cases failed to compile

* Add generated code for header.json

* Bug fix

* Bug fix

* Bug fix. Fix broken tests

* Refactor

* Refactor

* All generated code compiled

* Add decode Demical to String

* Refactor

* Change to use param.name

* WIP

* WIP

* WIP

* Fix compile error

* WIP. all generated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP. All geneerated code compiled

* WIP

* Regenerate test code

* Fix compile issue

* Refactor

* Bug fixes.

* Bug fix:

* Address PR feedback

* Fix compile warnings and all test cases passed

* Refactor

* Refactor

* Refactor

* Merge changes

* WIP. All tests passed

* All generated code compile. All test cases pass

* Refactor

* Refactor

* Refactor

* Address PR feedback

* Add asserts

* Use property name in find property from an array

* Fix compile eror in generated code

* Changes to enabel required-optional.json to compile

* Add generated code for required-optional

* Change testserver_codegen.py to support single file swagger name

* Regenerated test swagger code

* All generated code compiled

* Generated code for body-array.json

* Fix compile error in generated code

* Add generated code for body-array
2020-11-16 16:07:29 -08:00
Sam Cheung ba32c83d68
Change to support header.json (#250)
* Add test cases for body-byte.json

* Add putBase64UrlEncoded test case

* Remove unnecessary file

* Remove create project option in testserver_codegen.py

* Add generated code for body-number.json

* Change default swift type for Number from Float to Double

* Add test case for AutorestSwiftTest/AutoRestNumberTest.swift

* Update to use decimal

* All code compiled

* Refactor

* All code compiled. 5 number test failed

* Refactor

* Fix compile warnings in test case

* WIP. All generated code compiled. But test cases failed to compile

* Add generated code for header.json

* Bug fix

* Bug fix

* Bug fix. Fix broken tests

* Refactor

* Refactor

* All generated code compiled

* Add decode Demical to String

* Refactor

* Fix compile error

* WIP

* Regenerate test code

* Fix compile issue

* Refactor

* Bug fixes.

* Bug fix:

* Address PR feedback

* Fix compile warnings and all test cases passed

* Refactor

* Refactor

* Refactor

* Merge changes

* WIP. All tests passed

* All generated code compile. All test cases pass

* Refactor

* Refactor

* Refactor

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* ADdress PR feedback

* Address PR feedback
2020-11-16 13:56:30 -08:00
Sam Cheung d7e8f41e2d
Change to support body-number.json (#249)
* Add test cases for body-byte.json

* Add putBase64UrlEncoded test case

* Remove unnecessary file

* Remove create project option in testserver_codegen.py

* Add generated code for body-number.json

* Change default swift type for Number from Float to Double

* Add test case for AutorestSwiftTest/AutoRestNumberTest.swift

* Update to use decimal

* All code compiled

* Refactor

* All code compiled. 5 number test failed

* Refactor

* Fix compile warnings in test case

* Add decode Demical to String

* Refactor

* Fix compile error

* WIP

* Regenerate test code

* Fix compile issue

* Refactor

* Bug fixes.

* Bug fix:

* Address PR feedback

* Fix compile warnings and all test cases passed

* Refactor

* Refactor

* Refactor
2020-11-16 10:09:54 -08:00
Travis Prescott 8d843e2960
Pin AzureCore version (#251)
* Pin AzureCore version.

* Update package.swift files.

* Regenerate tests.
2020-11-12 18:00:41 -08:00
Sam Cheung 721037d596
Add test case from body-bytes.json (#247)
* Add test cases for body-byte.json

* Add putBase64UrlEncoded test case

* Remove unnecessary file

* Remove create project option in testserver_codegen.py

* Address PR feedback
2020-11-10 15:00:42 -08:00
Sam Cheung 600366dd92
Add test cases for enum operation in body-string.json (#246)
* Create a PropertyViewModel if contants is required

* Refactor

* WIP

* Add test cases for enum in body-string.json

* Revert change in PropertyViewModel

* Address PR feedback

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>
2020-11-10 14:45:57 -08:00
Sam Cheung 8dc27037a8
Regenerated code from master (#243) 2020-11-06 10:57:33 -08:00
Sam Cheung fe8e7b1855
Refactor existing test cases (#242)
* Add PutNull test case

* Remove default value in body param of signature

* Body parameter should not in Options struct

* look for body parameter in request parameter

* Fix putSimpleProductWithGrouping not able to compile issue

* Decode byteArray in response body

* Refactor test cases

* Cleanup test caess

* Regenerated code after merge
2020-11-02 09:23:12 -08:00
Sam Cheung 0fdc999464
Add 10 test cases for body-string string operation (#240)
* Add PutNull test case

* Remove default value in body param of signature

* Body parameter should not in Options struct

* look for body parameter in request parameter

* Fix putSimpleProductWithGrouping not able to compile issue

* Decode byteArray in response body

* Cleanup

* Address PR feedback

* Address PR feedback

* Upgrade autorest testserver version and regenerate the code
2020-11-02 07:49:09 -08:00
Travis Prescott 604d203a4b
Azure core pipeline update (2) (#241)
* Update for AzureSDK PR #515.

* Regenerate test code.

* Update project file.

* Fix baseUrl issue.

* Updates.
2020-10-30 12:08:19 -07:00
Travis Prescott 21c84e6d1f
Update for AzureSDK PR #515. (#239)
* Update for AzureSDK PR #515.

* Regenerate test code.

* Update project file.
2020-10-30 11:01:05 -07:00
Sam Cheung d587569659
Remove non tested generated code (#238) 2020-10-29 12:03:40 -07:00
Sam Cheung cb0d66e1e3
Support code generation for body-string.json (#237)
* Generate and compile body-string code

* Fix scripts/testserver_codegen.py

* Remove ErrorType logic in LanguageShortcut

* Refactor

* Add body-string generated code

* Add AutoRestSwaggerBat.xcodeproj to project

* Update generated code and test cases

* Regenerated code

* Remove xcodeproject files in the project. Use Swift Package Dependencies instead

* Refactor

* Refactor

* Add test case in AutoRestSwaggerBatTest.swift

* Fix merge conflict

* Fix merge errors
2020-10-29 11:23:41 -07:00
Sam Cheung c504afcd60
Refactor test cases for url.json (#236)
* Fix URL path , query parameters encoding

* All 77 test cases passed

* Add test case for Path.stringUrlEncoded

* Revert set of allowable characters in query parameter

* Fix test case Queries.stringUrlEncoded

* Add queries.unicode test case

* Add queries array test cases

* Add Path.base64 url test

* Add .paths.stringUrlNonEncoded test case

* Add new test case for arrayStringNoCollectionFormatEmpty

* Add test case test_Queries_arrayStringCsvEmpty200

* Cleanup

* Add test generated custom-baseUrl

* Add XC project

* Update testserver_codegen.sh

* Update testserver_codegen.sh

* WIP

* Add custombaseurl support

* Refactor

* Address PR Feedback

* Regenerate code after merge

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Remove scripts/testserver_codegen.sh

* Remove scripts/testserver_codegen.sh

* Fix stencil file

* Update per PR feedkbac

* Address PR feedback

* Address PR feedback

* Regenerated code

* Rename url parameters

* Rename parameters in url

* Break up Url test cases into 3 classes

* Remove obsolete test case

* Fix AutoRestHeadTest.xcodeproj project

* Add refactored url test cases

* Remove  AutoRestUrlTest.swift

* Rename methods

* comment out test list in ZZZAutoRestReportTest
2020-10-29 10:47:31 -07:00
Sam Cheung fe054250f8
Add 14 test cases from Url.json (#229)
* Fix URL path , query parameters encoding

* All 77 test cases passed

* Add test case for Path.stringUrlEncoded

* Revert set of allowable characters in query parameter

* Fix test case Queries.stringUrlEncoded

* Add queries.unicode test case

* Add queries array test cases

* Add Path.base64 url test

* Add .paths.stringUrlNonEncoded test case

* Add new test case for arrayStringNoCollectionFormatEmpty

* Add test case test_Queries_arrayStringCsvEmpty200

* Cleanup

* Update testserver_codegen.sh

* Update testserver_codegen.sh

* Address PR Feedback

* Remove scripts/testserver_codegen.sh

* Update per PR feedkbac

* Address PR feedback

* Add support for custom baseURl test cases (#230)

* Add test generated custom-baseUrl

* Add XC project

* WIP

* Add custombaseurl support

* Refactor

* Regenerate code after merge

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Remove scripts/testserver_codegen.sh

* Fix stencil file

* Code gen updates for AzureCore (#234)

* Updates for AzureCore changes in PR 510.

* Regenerate test code.

* Address PR feedback

* Address PR feedback

* Regenerated code

* Rename url parameters

* Rename parameters in url

* Address PR feedback

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>

* Regenerate code after rebase

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>
2020-10-28 16:45:42 -07:00
Travis Prescott 955a866fc2
Code gen updates for AzureCore (#234)
* Updates for AzureCore changes in PR 510.

* Regenerate test code.
2020-10-27 14:41:59 -07:00
Sam Cheung 695399c286
Calculate test coverage in AutoRestReportTest.swift (#227)
* Remvoe UserInterfaceState.xcuserstate from version control

* Support PathItems test cases

* Remove default empty string in query param

* Add support to encode UnixTime

* Address PR Feedback

* Fix Report

* Get test coverage

* Get test coverage in AutoRestReportTest.swift

* Fix merge conflicts

* Address PR feedback

* Address PR feedback

* Fix XC project
2020-10-23 10:44:16 -07:00
Sam Cheung e4a0f59797
Merge new changes from sacheu/pathitems to master (#228)
* Remvoe UserInterfaceState.xcuserstate from version control

* Support PathItems test cases

* Remove default empty string in query param

* Address PR feedback

* Address PR feedback

* Support encode unixTime in request body (#225)

* Add support to encode UnixTime

* Address PR Feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Remove constantValue in KeyValueModel

* Simpify format value for type

* Simpify format value for type

* Remove source in KeyValueModel

* Address PR feedback

* Add generated code per new change

* Remove unnecessary stencil file

* Refactor KeyValueViewModel.swift

* Remove unused condition in OperationMethodDecodingSnippet.stencil

* Simplify KeyValueDecodeStrategy

* Support $host in generated code (#226)

* current progress

* Support Host in generated code

* Support Host in generated code

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Fix xc projec file
2020-10-22 08:42:09 -07:00
Sam Cheung 5bdacda557
Add 4 test cases for Url.json PathItems (#224)
* Remvoe UserInterfaceState.xcuserstate from version control

* Support PathItems test cases

* Remove default empty string in query param

* Address PR feedback

* Address PR feedback

* Support encode unixTime in request body (#225)

* Add support to encode UnixTime

* Address PR Feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Address PR feedback

* Remove constantValue in KeyValueModel

* Simpify format value for type

* Simpify format value for type

* Remove source in KeyValueModel

* Address PR feedback

* Add generated code per new change

* Remove unnecessary stencil file

* Refactor KeyValueViewModel.swift

* Remove unused condition in OperationMethodDecodingSnippet.stencil

* Simplify KeyValueDecodeStrategy
2020-10-22 08:05:50 -07:00
Travis Prescott 323dfc9e1c
Model Flattening Tests (#221)
* Initial commit of tests.

* Write the tests they way I think they *should* look. Requires modification to code gen.

* Fix issue with defaults in initializers.

* Fix default nil in method signatures.

* Fix issue with GroupSchema model generation.

* Comment out failing tests.
2020-10-19 11:07:01 -07:00
Travis Prescott fbf085526d
model-flattening.json swagger support (#211)
* model-flattening testserver swagger.

* Add constants for models.

* Code review feedback.

* Code review feedback.
2020-10-13 09:59:13 -07:00
Sam Cheung a7b8178740
Add test cases for int, double, float from url.json test server (#219)
* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add test_Paths_enumValid200 test case

* Fix code generator to generate different code for date and datetime

* Add int/double/float tests

* Cleanup

* Add generated test code per changes

* Add generated test code per changes
2020-10-09 14:28:17 -07:00
Sam Cheung 1827f2b448
Add date datetime test cases in url.json (#218)
* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add test_Paths_enumValid200 test case

* Fix code generator to generate different code for date and datetime

* Address PR feedback

* Update

* Update for PR review

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>
2020-10-09 12:14:10 -07:00
Sam Cheung 7ad1e7c334
Add skipUrlEncoding in generated code (#215)
* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add skipUrlEncoding in generated code

* Add test_Paths_enumValid200 test case

* Address PR feedback

* Update src/AutorestSwift/Models/Complex/Value.swift

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>

Co-authored-by: Travis Prescott <tjprescott@users.noreply.github.com>
2020-10-09 10:58:26 -07:00
Sam Cheung 1a0e7781ae
Add 10 new test cases from url.json (#209)
* Fix autorest swift to support AutoRestUrlTest

* Add new generated code from changes in Autorest swift

* Add test cases for url.json

* Remove failed expectation in test cases

* Address PR feedback

* Update Xcode project
2020-10-07 09:21:29 -07:00
Sam Cheung 38cd0c7c20
Remove failedExpectation in all test cases (#213)
* Remove failedExpectation in all test cases

* Rebase to master

* Cleanup
2020-10-06 14:33:50 -07:00
Travis Prescott 5aca47bd5e
Fix make clean. (#212)
* Fix make clean.

* Add Package.resolved to gitignore.
2020-10-06 13:39:12 -07:00
Sam Cheung e469de20a1
Fix xcode project after newly generated code (#208)
* Fix xcode project

* Fix xcode project
2020-10-06 09:19:07 -07:00